menu_rebuild

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/menu.inc, строка 1670

Версии
5 – 6
menu_rebuild()

(Пере)заполняет таблицы базы данных, используемые различными функциями меню.

Эта функция очищает и заполняет таблицу {menu_router}, добавляет записи в {menu_links} для новых элементов, потом удаляет устаревшие элементы из {menu_links}. Если вызывается из update.php или install.php, также планирует вызов самой себя на первую существующую страницу загруженную из menu_execute_active_handler(), потому что окружение страницы обслуживания меняется и содержит устаревшие данные в таблицах меню.

Связанные темы

▾ 16 функции вызывают menu_rebuild()

default_profile_tasks in profiles/default/default.profile
Perform any final installation tasks for this profile.
drupal_flush_all_caches in includes/common.inc
Flush all cached data on the site.
example_profile_tasks in ./example.profile
Perform any final installation tasks for this profile.
menu_enable in modules/menu/menu.module
Реализация hook_enable().
menu_execute_active_handler in includes/menu.inc
Выполняет функцию, которая ассоциируется с текущим путём.
menu_uninstall in modules/menu/menu.install
Реализация hook_uninstall().
node_type_delete_confirm_submit in modules/node/content_types.inc
Process content type delete confirm submissions.
node_type_form_submit in modules/node/content_types.inc
Implementation of hook_form_submit().
profile_admin_overview_submit in modules/profile/profile.admin.inc
Submit handler to update changed profile field weights and categories. See alsoprofile_admin_overview()
profile_field_form_submit in modules/profile/profile.admin.inc
Process profile_field_form submissions.
system_modules in modules/system/system.admin.inc
Menu callback; provides module enable/disable interface.
system_themes_form_submit in modules/system/system.admin.inc
Process system_themes_form form submissions.
system_update_6021 in modules/system/system.install
Migrate the menu items from the old menu system to the new menu_links table.
system_update_6029 in modules/system/system.install
Enable the dblog module on sites that upgrade, since otherwise watchdog logging will stop unexpectedly.
update_uninstall in modules/update/update.install
Реализация hook_uninstall().
_locale_import_po in includes/locale.inc
Parses Gettext Portable Object file information and inserts into database

Код

<?php
function menu_rebuild() {
  variable_del('menu_rebuild_needed');
  $menu = menu_router_build(TRUE);
  _menu_navigation_links_rebuild($menu);
  // Clear the menu, page and block caches.
  menu_cache_clear_all();
  _menu_clear_page_cache();
  if (defined('MAINTENANCE_MODE')) {
    variable_set('menu_rebuild_needed', TRUE);
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему