function _menu_check_rebuild

Checks whether a menu_rebuild() is necessary.

Related topics

2 calls to _menu_check_rebuild()
menu_get_item in includes/menu.inc
Gets a router item.
menu_rebuild in includes/menu.inc
Populates the database tables used by various menu functions.

File

includes/menu.inc, line 2748

Code

function _menu_check_rebuild() {
    // To absolutely ensure that the menu rebuild is required, re-load the
    // variables in case they were set by another process.
    $variables = variable_initialize();
    if (empty($variables['menu_rebuild_needed']) && !empty($variables['menu_masks'])) {
        unset($GLOBALS['conf']['menu_rebuild_needed']);
        $GLOBALS['conf']['menu_masks'] = $variables['menu_masks'];
        return FALSE;
    }
    return TRUE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.