summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-12-01 15:57:40 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-12-01 15:57:40 +0000
commitf79924352fc9b1caa5e734e62f0dfa66844f31fb (patch)
treeead1f96e364bfa00aa4aedc2f21fa3f42e024956 /modules/system
parent7de42b4263e255e0fa217fb4729e9c0d32f91de8 (diff)
downloadbrdo-f79924352fc9b1caa5e734e62f0dfa66844f31fb.tar.gz
brdo-f79924352fc9b1caa5e734e62f0dfa66844f31fb.tar.bz2
#632030 by JohnAlbin: Merge Garland and Minnelli into one theme.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc4
-rw-r--r--modules/system/system.install40
2 files changed, 43 insertions, 1 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 33e22362f..8489287ff 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -307,8 +307,10 @@ function system_themes_page() {
// There are two possible theme groups.
$theme_group_titles = array(
'enabled' => format_plural(count($theme_groups['enabled']), 'Enabled theme', 'Enabled themes'),
- 'disabled' => format_plural(count($theme_groups['disabled']), 'Disabled theme', 'Disabled themes'),
);
+ if (!empty($theme_groups['disabled'])) {
+ $theme_group_titles['disabled'] = format_plural(count($theme_groups['disabled']), 'Disabled theme', 'Disabled themes');
+ };
uasort($theme_groups['enabled'], 'system_sort_themes');
drupal_alter('system_themes_page', $theme_groups);
diff --git a/modules/system/system.install b/modules/system/system.install
index ccaf437c4..987e7a0e4 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -2766,6 +2766,46 @@ function system_update_7045() {
}
/**
+ * Switch from the Minnelli theme if it is the default or admin theme.
+ */
+function system_update_7046() {
+ if (variable_get('theme_default') == 'minnelli' || variable_get('admin_theme') == 'minnelli') {
+ // Make sure Garland is enabled.
+ db_update('system')
+ ->fields(array('status' => 1))
+ ->condition('type', 'theme')
+ ->condition('name', 'garland')
+ ->execute();
+ if (variable_get('theme_default') != 'garland') {
+ // If the default theme isn't Garland, transfer all of Minnelli's old
+ // settings to Garland.
+ $settings = variable_get('theme_minnelli_settings', array());
+ // Set the theme setting width to "fixed" to match Minnelli's old layout.
+ $settings['garland_width'] = 'fixed';
+ variable_set('theme_garland_settings', $settings);
+ // Remove Garland's color files since they won't match Minnelli's.
+ foreach (variable_get('color_garland_files', array()) as $file) {
+ @unlink($file);
+ }
+ if (isset($file) && $file = dirname($file)) {
+ @rmdir($file);
+ }
+ variable_del('color_garland_palette');
+ variable_del('color_garland_stylesheets');
+ variable_del('color_garland_logo');
+ variable_del('color_garland_files');
+ variable_del('color_garland_screenshot');
+ }
+ if (variable_get('theme_default') == 'minnelli') {
+ variable_set('theme_default', 'garland');
+ }
+ if (variable_get('admin_theme') == 'minnelli') {
+ variable_set('admin_theme', 'garland');
+ }
+ }
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/