diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index dc569b1..abd466e 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -2008,9 +2008,7 @@ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NO ); // Call the logging hooks to log/process the message - foreach (module_implements('watchdog') as $module) { - module_invoke($module, 'watchdog', $log_entry); - } + module_invoke_all('watchdog', $log_entry); // It is critical that the semaphore is only cleared here, in the parent // watchdog() call (not outside the loop), to prevent recursive execution. diff --git a/includes/menu.inc b/includes/menu.inc index 4664d27..a6398f6 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -2744,10 +2744,7 @@ function _menu_check_rebuild() { * * This function will clear and populate the {menu_router} table, add entries * to {menu_links} for new router items, and then remove stale items from - * {menu_links}. If called from update.php or install.php, it will also - * schedule a call to itself on the first real page load from - * menu_execute_active_handler(), because the maintenance page environment - * is different and leaves stale data in the menu tables. + * {menu_links}. * * @return * TRUE if the menu was rebuilt, FALSE if another thread was rebuilding @@ -2779,13 +2776,8 @@ function menu_rebuild() { // 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); - } - else { - variable_del('menu_rebuild_needed'); - } + // Indicate that the menu has been successfully rebuilt. + variable_del('menu_rebuild_needed'); } catch (Exception $e) { $transaction->rollback(); diff --git a/modules/block/block.module b/modules/block/block.module index d68ea9e..41e69b9 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -149,7 +149,7 @@ function block_menu() { 'type' => $key == $default_theme ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK, 'weight' => $key == $default_theme ? -10 : 0, 'access callback' => '_block_themes_access', - 'access arguments' => array($theme), + 'access arguments' => array($key), 'file' => 'block.admin.inc', ); if ($key != $default_theme) { @@ -168,7 +168,7 @@ function block_menu() { 'page arguments' => array($key), 'type' => MENU_CALLBACK, 'access callback' => '_block_themes_access', - 'access arguments' => array($theme), + 'access arguments' => array($key), 'theme callback' => '_block_custom_theme', 'theme arguments' => array($key), 'file' => 'block.admin.inc', diff --git a/modules/system/system.module b/modules/system/system.module index 53844d8..a5c9d41 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -649,13 +649,13 @@ function system_menu() { 'weight' => -1, ); - foreach (list_themes() as $theme) { + foreach (list_themes() as $key => $theme) { $items['admin/appearance/settings/' . $theme->name] = array( 'title' => $theme->info['name'], 'page arguments' => array('system_theme_settings', $theme->name), 'type' => MENU_LOCAL_TASK, 'access callback' => '_system_themes_access', - 'access arguments' => array($theme), + 'access arguments' => array($key), 'file' => 'system.admin.inc', ); }