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
8b1900b1
Commit
8b1900b1
authored
12 years ago
by
Chris Leppanen
Browse files
Options
Downloads
Patches
Plain Diff
Issue #1245094 by chrisdejager, dman: Fixed Node menu link deleted on update.
parent
32969628
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/FeedsNodeProcessor.inc
+10
-0
10 additions, 0 deletions
plugins/FeedsNodeProcessor.inc
with
10 additions
and
0 deletions
plugins/FeedsNodeProcessor.inc
+
10
−
0
View file @
8b1900b1
...
@@ -46,6 +46,8 @@ class FeedsNodeProcessor extends FeedsProcessor {
...
@@ -46,6 +46,8 @@ class FeedsNodeProcessor extends FeedsProcessor {
*
*
* If the update existing method is not FEEDS_UPDATE_EXISTING, only the node
* If the update existing method is not FEEDS_UPDATE_EXISTING, only the node
* table will be loaded, foregoing the node_load API for better performance.
* table will be loaded, foregoing the node_load API for better performance.
*
* @todo Reevaluate the use of node_object_prepare().
*/
*/
protected
function
entityLoad
(
FeedsSource
$source
,
$nid
)
{
protected
function
entityLoad
(
FeedsSource
$source
,
$nid
)
{
if
(
$this
->
config
[
'update_existing'
]
==
FEEDS_UPDATE_EXISTING
)
{
if
(
$this
->
config
[
'update_existing'
]
==
FEEDS_UPDATE_EXISTING
)
{
...
@@ -57,6 +59,14 @@ class FeedsNodeProcessor extends FeedsProcessor {
...
@@ -57,6 +59,14 @@ class FeedsNodeProcessor extends FeedsProcessor {
$node
->
uid
=
$this
->
config
[
'author'
];
$node
->
uid
=
$this
->
config
[
'author'
];
}
}
node_object_prepare
(
$node
);
node_object_prepare
(
$node
);
// Workaround for issue #1247506. See #1245094 for backstory.
if
(
!
empty
(
$node
->
menu
))
{
// If the node has a menu item(with a valid mlid) it must be flagged
// 'enabled'.
$node
->
menu
[
'link'
][
'enabled'
]
=
(
int
)
(
bool
)
$node
->
menu
[
'link'
][
'mlid'
];
}
// Populate properties that are set by node_object_prepare().
// Populate properties that are set by node_object_prepare().
if
(
$this
->
config
[
'update_existing'
]
==
FEEDS_UPDATE_EXISTING
)
{
if
(
$this
->
config
[
'update_existing'
]
==
FEEDS_UPDATE_EXISTING
)
{
$node
->
log
=
'Updated by FeedsNodeProcessor'
;
$node
->
log
=
'Updated by FeedsNodeProcessor'
;
...
...
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