Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
294
Merge Requests
294
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
968a51a4
Commit
968a51a4
authored
Nov 16, 2006
by
drumm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#72674
by kkaefer. Make adding menu items for local tasks not interfere with the local task.
parent
72fc8dbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
includes/menu.inc
includes/menu.inc
+12
-2
No files found.
includes/menu.inc
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
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment