summaryrefslogtreecommitdiff
path: root/modules/system/system.admin.inc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.admin.inc')
-rw-r--r--modules/system/system.admin.inc18
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 3be8ea184..9e7d69dd3 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1,5 +1,4 @@
<?php
-// $Id$
/**
* @file
@@ -55,6 +54,7 @@ function system_admin_config_page() {
/**
* Provide a single block from the administration menu as a page.
+ *
* This function is often a destination for these blocks.
* For example, 'admin/structure/types' needs to have a destination to be valid
* in the Drupal menu system, but too much information there might be
@@ -158,7 +158,6 @@ function system_themes_page() {
'alt' => t('Screenshot for !theme theme', array('!theme' => $theme->info['name'])),
'title' => t('Screenshot for !theme theme', array('!theme' => $theme->info['name'])),
'attributes' => array('class' => array('screenshot')),
- 'getsize' => FALSE,
);
break;
}
@@ -350,6 +349,14 @@ function system_theme_default() {
}
// Set the default theme.
variable_set('theme_default', $theme);
+
+ // Rebuild the menu. This duplicates the menu_rebuild() in theme_enable().
+ // However, modules must know the current default theme in order to use
+ // this information in hook_menu() or hook_menu_alter() implementations,
+ // and doing the variable_set() before the theme_enable() could result
+ // in a race condition where the theme is default but not enabled.
+ menu_rebuild();
+
// The status message depends on whether an admin theme is currently in use:
// a value of 0 means the admin theme is set to be the default theme.
$admin_theme = variable_get('admin_theme', 0);
@@ -1030,7 +1037,7 @@ function system_modules_confirm_form($modules, $storage) {
'@module' => $name,
'@depends' => implode(', ', $info['depends']),
);
- $items[] = format_plural(count($info['depends']), 'The @module module is missing, so the following module will be disabled: @depends.', 'The @module module is missing, so the following module will be disabled: @depends.', $t_argument);
+ $items[] = format_plural(count($info['depends']), 'The @module module is missing, so the following module will be disabled: @depends.', 'The @module module is missing, so the following modules will be disabled: @depends.', $t_argument);
}
$form['text'] = array('#markup' => theme('item_list', array('items' => $items)));
@@ -1182,11 +1189,6 @@ function system_modules_submit($form, &$form_state) {
}
$form_state['redirect'] = 'admin/modules';
-
- // Notify locale module about module changes, so translations can be
- // imported. This might start a batch, and only return to the redirect
- // path after that.
- module_invoke('locale', 'system_update', $actions['install']);
}
/**