Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
988d4f50
Commit
988d4f50
authored
Oct 17, 2007
by
Gábor Hojtsy
Browse files
#173188
follow up patch by chx: return mlid when a new menu link is added
parent
ba5fce22
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/menu.inc
View file @
988d4f50
...
...
@@ -1796,6 +1796,8 @@ function _menu_find_router_path($menu, $link_path) {
* @param $link_title
* Title of the link to insert or new title to update the link to.
* Unused for delete.
* @return
* The insert op returns the mlid of the new item. Others op return NULL.
*/
function
menu_link_maintain
(
$module
,
$op
,
$link_path
,
$link_title
)
{
switch
(
$op
)
{
...
...
@@ -1805,7 +1807,7 @@ function menu_link_maintain($module, $op, $link_path, $link_title) {
'link_path'
=>
$link_path
,
'module'
=>
$module
,
);
menu_link_save
(
$menu_link
);
return
menu_link_save
(
$menu_link
);
break
;
case
'update'
:
db_query
(
"UPDATE
{
menu_links
}
SET link_title = '%s' WHERE link_path = '%s' AND customized = 0 AND module = '%s'"
,
$link_title
,
$link_path
,
$module
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment