Commit 988d4f50 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#173188 follow up patch by chx: return mlid when a new menu link is added

parent ba5fce22
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment