menu_execute_active_handler
includes/menu.inc, строка 333
- Версии
- 5
menu_execute_active_handler()
- 6
menu_execute_active_handler($path = NULL)
Выполняет функцию, которая ассоциируется с текущим путём.
Связанные темы
Код
<?php
function menu_execute_active_handler($path = NULL) {
if (_menu_site_is_offline()) {
return MENU_SITE_OFFLINE;
}
// 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)) {
if ($router_item['access']) {
if ($router_item['file']) {
require_once($router_item['file']);
}
return call_user_func_array($router_item['page_callback'], $router_item['page_arguments']);
}
else {
return MENU_ACCESS_DENIED;
}
}
return MENU_NOT_FOUND;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии