function _menu_check_rebuild

_menu_check_rebuild()

Checks whether a menu_rebuild() is necessary.

Related topics

File

includes/menu.inc, line 2729
API for the Drupal menu system.

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!menu.inc/function/_menu_check_rebuild/7.x