#261148 by chx and pwolanin: Allow recovery from a failed menu build.
parent
39fad4e75b
commit
34ec8f9834
|
@ -387,7 +387,9 @@ function menu_execute_active_handler($path = NULL) {
|
||||||
if (_menu_site_is_offline()) {
|
if (_menu_site_is_offline()) {
|
||||||
return MENU_SITE_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();
|
menu_rebuild();
|
||||||
}
|
}
|
||||||
if ($router_item = menu_get_item($path)) {
|
if ($router_item = menu_get_item($path)) {
|
||||||
|
|
Loading…
Reference in New Issue