diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-10-25 05:42:20 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-10-25 05:42:20 +0000 |
commit | 0d2c12a1897b38bd9c10182494709dae9001d497 (patch) | |
tree | c7750b901c2ab2b5e25a090bd85177a8b4b139d2 /modules/system.module | |
parent | 0cac6939b770e4685f368bd87beb5fd01120218b (diff) | |
download | brdo-0d2c12a1897b38bd9c10182494709dae9001d497.tar.gz brdo-0d2c12a1897b38bd9c10182494709dae9001d497.tar.bz2 |
- Patch #34086 by chx: fixed blog regions being broken.
Diffstat (limited to 'modules/system.module')
-rw-r--r-- | modules/system.module | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/system.module b/modules/system.module index d41f67fa9..bd0b89d82 100644 --- a/modules/system.module +++ b/modules/system.module @@ -787,14 +787,18 @@ function system_themes_execute($form_id, $values) { db_query("UPDATE {system} SET status = 0 WHERE type = 'theme'"); if ($_POST['op'] == t('Save configuration')) { - variable_set('theme_default', $values['theme_default']); if (is_array($values['status'])) { foreach ($values['status'] as $key => $choice) { if ($choice) { + // If theme status is being set to 1 from 0, initialize block data for this theme if necessary. + if (db_num_rows(db_query("SELECT status FROM {system} WHERE type = 'theme' AND name = '%s' AND status = 0", $key))) { + system_initialize_theme_blocks($key); + } db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' and name = '%s'", $key); } } } + variable_set('theme_default', $values['theme_default']); } else { variable_del('theme_default'); |