Commit 0fe57fe6 authored by Dries's avatar Dries

- Patch #36333 by Tobias Maier: make sure to enable the default theme.

parent 46fee741
...@@ -826,7 +826,8 @@ function system_themes_execute($form_id, $values) { ...@@ -826,7 +826,8 @@ function system_themes_execute($form_id, $values) {
if ($_POST['op'] == t('Save configuration')) { if ($_POST['op'] == t('Save configuration')) {
if (is_array($values['status'])) { if (is_array($values['status'])) {
foreach ($values['status'] as $key => $choice) { foreach ($values['status'] as $key => $choice) {
if ($choice) { // Always enable the default theme, despite its status checkbox being checked:
if ($choice || $values['theme_default'] == $key) {
// If theme status is being set to 1 from 0, initialize block data for this theme if necessary. // 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))) { 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); system_initialize_theme_blocks($key);
......
...@@ -826,7 +826,8 @@ function system_themes_execute($form_id, $values) { ...@@ -826,7 +826,8 @@ function system_themes_execute($form_id, $values) {
if ($_POST['op'] == t('Save configuration')) { if ($_POST['op'] == t('Save configuration')) {
if (is_array($values['status'])) { if (is_array($values['status'])) {
foreach ($values['status'] as $key => $choice) { foreach ($values['status'] as $key => $choice) {
if ($choice) { // Always enable the default theme, despite its status checkbox being checked:
if ($choice || $values['theme_default'] == $key) {
// If theme status is being set to 1 from 0, initialize block data for this theme if necessary. // 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))) { 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); system_initialize_theme_blocks($key);
......
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