#261148 by chx and pwolanin: Allow recovery from a failed menu build.

merge-requests/26/head
Angie Byron 2008-10-08 01:42:16 +00:00
parent 39fad4e75b
commit 34ec8f9834
1 changed files with 3 additions and 1 deletions

View File

@ -387,7 +387,9 @@ function menu_execute_active_handler($path = NULL) {
if (_menu_site_is_offline()) {
return MENU_SITE_OFFLINE;
}
if (variable_get('menu_rebuild_needed', FALSE)) {
// Rebuild if we know it's needed, or if the menu masks are missing which
// occurs rarely, likely due to a race condition of multiple rebuilds.
if (variable_get('menu_rebuild_needed', FALSE) || !variable_get('menu_masks', array())) {
menu_rebuild();
}
if ($router_item = menu_get_item($path)) {