Commit 0d2c12a1 authored by Dries's avatar Dries

- Patch #34086 by chx: fixed blog regions being broken.

parent 0cac6939
......@@ -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');
......
......@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment