Commit 12eb2023 authored by Dries's avatar Dries

- Patch #11430 by JonBob: reseting the menus broke the admin pages.

parent 4a0e0474
......@@ -496,6 +496,8 @@ function menu_rebuild() {
// Also clear the menu cache.
cache_clear_all('menu:', TRUE);
_menu_build();
if (module_exist('menu')) {
$menu = menu_get_menu();
......@@ -523,13 +525,15 @@ function menu_rebuild() {
}
}
foreach ($new_items as $item) {
db_query('INSERT INTO {menu} (mid, pid, path, title, description, weight, type) VALUES (%d, %d, \'%s\', \'%s\', \'%s\', %d, %d)', $item['mid'], $item['pid'], $item['path'], $item['title'], $item['description'], $item['weight'], $item['type']);
if (count($new_items) > 1) {
foreach ($new_items as $item) {
db_query('INSERT INTO {menu} (mid, pid, path, title, description, weight, type) VALUES (%d, %d, \'%s\', \'%s\', \'%s\', %d, %d)', $item['mid'], $item['pid'], $item['path'], $item['title'], $item['description'], $item['weight'], $item['type']);
}
// Rebuild the menu to account for the changes.
_menu_build();
}
}
// Rebuild the menu to account for any changes.
_menu_build();
}
/**
......
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