summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2008-09-22 03:19:43 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2008-09-22 03:19:43 +0000
commitccdeae8d81f37e556047099bbfc361cb0d75d818 (patch)
treea3ae0d28f4a4f68a702dde9b174387e1b09e4df4 /includes
parent784b01b12015e9aca3f80a906884f8bd995a617e (diff)
downloadbrdo-ccdeae8d81f37e556047099bbfc361cb0d75d818.tar.gz
brdo-ccdeae8d81f37e556047099bbfc361cb0d75d818.tar.bz2
#238760 follow-up by pwolanin: Forward-port rest of 6.x fix for menu_rebuild() race condition.
Diffstat (limited to 'includes')
-rw-r--r--includes/menu.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index d5e45a0c5..312812aa0 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -2340,10 +2340,11 @@ function _menu_router_build($callbacks) {
}
array_multisort($sort, SORT_NUMERIC, $menu);
- if ($menu) {
- // Delete the existing router since we have some data to replace it.
- db_query('DELETE FROM {menu_router}');
+ if (!$menu) {
+ return array();
}
+ // Delete the existing router since we have some data to replace it.
+ db_query('DELETE FROM {menu_router}');
// Apply inheritance rules.
foreach ($menu as $path => $v) {
$item = &$menu[$path];