Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
32846d4f
Commit
32846d4f
authored
12 years ago
by
theduke
Committed by
Chris Leppanen
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue #1703074 by theduke: Added Include parser result in hook_feeds_presave().
parent
2ba69d6a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
feeds.api.php
+3
-1
3 additions, 1 deletion
feeds.api.php
plugins/FeedsProcessor.inc
+1
-1
1 addition, 1 deletion
plugins/FeedsProcessor.inc
with
4 additions
and
2 deletions
feeds.api.php
+
3
−
1
View file @
32846d4f
...
@@ -104,8 +104,10 @@ function hook_feeds_after_parse(FeedsSource $source, FeedsParserResult $result)
...
@@ -104,8 +104,10 @@ function hook_feeds_after_parse(FeedsSource $source, FeedsParserResult $result)
* FeedsSource object that describes the source that is being imported.
* FeedsSource object that describes the source that is being imported.
* @param $entity
* @param $entity
* The entity object.
* The entity object.
* @param $item
* The parser result for this entity.
*/
*/
function
hook_feeds_presave
(
FeedsSource
$source
,
$entity
)
{
function
hook_feeds_presave
(
FeedsSource
$source
,
$entity
,
$item
)
{
if
(
$entity
->
feeds_item
->
entity_type
==
'node'
)
{
if
(
$entity
->
feeds_item
->
entity_type
==
'node'
)
{
// Skip saving this entity.
// Skip saving this entity.
$entity
->
feeds_item
->
skip
=
TRUE
;
$entity
->
feeds_item
->
skip
=
TRUE
;
...
...
This diff is collapsed.
Click to expand it.
plugins/FeedsProcessor.inc
+
1
−
1
View file @
32846d4f
...
@@ -132,7 +132,7 @@ abstract class FeedsProcessor extends FeedsPlugin {
...
@@ -132,7 +132,7 @@ abstract class FeedsProcessor extends FeedsPlugin {
$this
->
entityValidate
(
$entity
);
$this
->
entityValidate
(
$entity
);
// Allow modules to alter the entity before saving.
// Allow modules to alter the entity before saving.
module_invoke_all
(
'feeds_presave'
,
$source
,
$entity
);
module_invoke_all
(
'feeds_presave'
,
$source
,
$entity
,
$item
);
if
(
module_exists
(
'rules'
))
{
if
(
module_exists
(
'rules'
))
{
rules_invoke_event
(
'feeds_import_'
.
$source
->
importer
()
->
id
,
$entity
);
rules_invoke_event
(
'feeds_import_'
.
$source
->
importer
()
->
id
,
$entity
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment