Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443488
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443488
Commits
968a51a4
Commit
968a51a4
authored
18 years ago
by
Neil Drumm
Browse files
Options
Downloads
Patches
Plain Diff
#72674
by kkaefer. Make adding menu items for local tasks not interfere with the local task.
parent
72fc8dbc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/menu.inc
+12
-2
12 additions, 2 deletions
includes/menu.inc
with
12 additions
and
2 deletions
includes/menu.inc
+
12
−
2
View file @
968a51a4
...
...
@@ -1101,8 +1101,13 @@ function _menu_build() {
if
(
$old_mid
<
0
)
{
// It had a temporary ID, so use a permanent one.
$_menu
[
'items'
][
$item
->
mid
]
=
$_menu
[
'items'
][
$old_mid
];
unset
(
$_menu
[
'items'
][
$old_mid
]);
$_menu
[
'path index'
][
$item
->
path
]
=
$item
->
mid
;
if
(
$_menu
[
'items'
][
$item
->
mid
][
'type'
]
&
$item
->
type
)
{
// If the item is of the same type, delete the old item.
unset
(
$_menu
[
'items'
][
$old_mid
]);
$_menu
[
'path index'
][
$item
->
path
]
=
$item
->
mid
;
}
// The new menu item gets all the custom type flags from the database
$_menu
[
'items'
][
$item
->
mid
][
'type'
]
&=
$item
->
type
;
}
else
{
// It has a permanent ID. Only replace with non-custom menu items.
...
...
@@ -1258,6 +1263,11 @@ function _menu_append_contextual_items() {
$_menu
[
'items'
][
$mid
][
'callback arguments'
]
=
$item
[
'callback arguments'
];
}
}
if
(
$item
[
'type'
]
&
MENU_LOCAL_TASK
&&
!
(
$_menu
[
'items'
][
$mid
][
'type'
]
&
MENU_LOCAL_TASK
))
{
// A local task is in the menu table and the path is already present
$_menu
[
'items'
][
$mid
][
'type'
]
=
MENU_LOCAL_TASK
;
$new_items
[
$mid
]
=
$item
;
}
}
}
...
...
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