diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-17 19:42:02 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-10-17 19:42:02 +0000 |
commit | 988d4f505a8896df226660f37286c7f0bbe01e01 (patch) | |
tree | abb27b48c3683781565bbba3f8820fc296d6cf89 /includes | |
parent | ba5fce22ca76269077abc061c0483f4d394b4d70 (diff) | |
download | brdo-988d4f505a8896df226660f37286c7f0bbe01e01.tar.gz brdo-988d4f505a8896df226660f37286c7f0bbe01e01.tar.bz2 |
#173188 follow up patch by chx: return mlid when a new menu link is added
Diffstat (limited to 'includes')
-rw-r--r-- | includes/menu.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index 5660e8fdc..63282ca7f 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -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); |