diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-11 16:56:48 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-11 16:56:48 +0000 |
commit | f2ecddea98896f73c64b5b3cee47c6b9f872966a (patch) | |
tree | b2ef81fe3b1932741e2b50ea87d98f1dc5fe9a48 /modules/menu/menu.module | |
parent | bd108c7f1036858fc2b4293ee2bad0474129fab9 (diff) | |
download | brdo-f2ecddea98896f73c64b5b3cee47c6b9f872966a.tar.gz brdo-f2ecddea98896f73c64b5b3cee47c6b9f872966a.tar.bz2 |
#328110 by Damien Tournoud: Remove recoverable fatal error from menu system.
Diffstat (limited to 'modules/menu/menu.module')
-rw-r--r-- | modules/menu/menu.module | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/menu/menu.module b/modules/menu/menu.module index cc2fcb69c..656a87a8a 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -154,11 +154,13 @@ function menu_theme() { */ function menu_enable() { menu_rebuild(); - $link = db_fetch_array(db_query("SELECT mlid AS plid, menu_name from {menu_links} WHERE link_path = 'admin/build/menu' AND module = 'system'")); - $link['router_path'] = 'admin/build/menu-customize/%'; - $link['module'] = 'menu'; + $base_link = db_fetch_array(db_query("SELECT mlid AS plid, menu_name from {menu_links} WHERE link_path = 'admin/build/menu' AND module = 'system'")); + $base_link['router_path'] = 'admin/build/menu-customize/%'; + $base_link['module'] = 'menu'; $result = db_query("SELECT * FROM {menu_custom}"); while ($menu = db_fetch_array($result)) { + // $link is passed by reference to menu_link_save(), so we make a copy of $base_link. + $link = $base_link; $link['mlid'] = 0; $link['link_title'] = $menu['title']; $link['link_path'] = 'admin/build/menu-customize/' . $menu['menu_name']; |