Commit 9c7c23c8 authored by Dries's avatar Dries

- Patch #52431 by Zen: simplified some code.

parent 47cf9dd9
...@@ -740,14 +740,10 @@ function system_theme_settings_submit($form_id, $values) { ...@@ -740,14 +740,10 @@ function system_theme_settings_submit($form_id, $values) {
if ($op == t('Reset to defaults')) { if ($op == t('Reset to defaults')) {
variable_del($key); variable_del($key);
}
else {
variable_set($key, $values);
}
if ($op == t('Reset to defaults')) {
drupal_set_message(t('The configuration options have been reset to their default values.')); drupal_set_message(t('The configuration options have been reset to their default values.'));
} }
else { else {
variable_set($key, $values);
drupal_set_message(t('The configuration options have been saved.')); drupal_set_message(t('The configuration options have been saved.'));
} }
} }
...@@ -874,7 +870,7 @@ function system_themes_submit($form_id, $values) { ...@@ -874,7 +870,7 @@ function system_themes_submit($form_id, $values) {
} }
else { else {
variable_del('theme_default'); variable_del('theme_default');
db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name ='bluemarine'"); db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name = 'bluemarine'");
} }
menu_rebuild(); menu_rebuild();
......
...@@ -740,14 +740,10 @@ function system_theme_settings_submit($form_id, $values) { ...@@ -740,14 +740,10 @@ function system_theme_settings_submit($form_id, $values) {
if ($op == t('Reset to defaults')) { if ($op == t('Reset to defaults')) {
variable_del($key); variable_del($key);
}
else {
variable_set($key, $values);
}
if ($op == t('Reset to defaults')) {
drupal_set_message(t('The configuration options have been reset to their default values.')); drupal_set_message(t('The configuration options have been reset to their default values.'));
} }
else { else {
variable_set($key, $values);
drupal_set_message(t('The configuration options have been saved.')); drupal_set_message(t('The configuration options have been saved.'));
} }
} }
...@@ -874,7 +870,7 @@ function system_themes_submit($form_id, $values) { ...@@ -874,7 +870,7 @@ function system_themes_submit($form_id, $values) {
} }
else { else {
variable_del('theme_default'); variable_del('theme_default');
db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name ='bluemarine'"); db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name = 'bluemarine'");
} }
menu_rebuild(); menu_rebuild();
......
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