Commit 8fa7e354 authored by Dries's avatar Dries
Browse files

- Fixed a caching bug.
parent 61b76fa2
...@@ -109,12 +109,6 @@ function system_save($edit = array()) { ...@@ -109,12 +109,6 @@ function system_save($edit = array()) {
variable_set($name, $value); variable_set($name, $value);
} }
/*
** Clear the cache so the changes take effect for anonymous users.
*/
cache_clear_all();
return t("The configuration options have been saved."); return t("The configuration options have been saved.");
} }
...@@ -240,6 +234,7 @@ function system_admin() { ...@@ -240,6 +234,7 @@ function system_admin() {
foreach ($edit["status"] as $filename => $status) { foreach ($edit["status"] as $filename => $status) {
db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status); db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status);
} }
cache_clear_all();
case "modules": case "modules":
// Note: changing this also requires changing module_init() @ includes/module.inc. // Note: changing this also requires changing module_init() @ includes/module.inc.
$required = array("modules/user.module", "modules/system.module", "modules/watchdog.module"); $required = array("modules/user.module", "modules/system.module", "modules/watchdog.module");
...@@ -250,16 +245,19 @@ function system_admin() { ...@@ -250,16 +245,19 @@ function system_admin() {
foreach ($edit["status"] as $filename => $status) { foreach ($edit["status"] as $filename => $status) {
db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status); db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status);
} }
cache_clear_all();
case "themes": case "themes":
print system_listing("theme", "themes"); print system_listing("theme", "themes");
break; break;
case t("Reset to defaults"): case t("Reset to defaults"):
print status(system_default($edit)); print status(system_default($edit));
print system_view($type); print system_view($type);
cache_clear_all();
break; break;
case t("Save configuration"): case t("Save configuration"):
print status(system_save($edit)); print status(system_save($edit));
print system_view($type); print system_view($type);
cache_clear_all();
break; break;
default: default:
print system_view($type); print system_view($type);
...@@ -270,4 +268,4 @@ function system_admin() { ...@@ -270,4 +268,4 @@ function system_admin() {
} }
} }
?> ?>
\ No newline at end of file
...@@ -109,12 +109,6 @@ function system_save($edit = array()) { ...@@ -109,12 +109,6 @@ function system_save($edit = array()) {
variable_set($name, $value); variable_set($name, $value);
} }
/*
** Clear the cache so the changes take effect for anonymous users.
*/
cache_clear_all();
return t("The configuration options have been saved."); return t("The configuration options have been saved.");
} }
...@@ -240,6 +234,7 @@ function system_admin() { ...@@ -240,6 +234,7 @@ function system_admin() {
foreach ($edit["status"] as $filename => $status) { foreach ($edit["status"] as $filename => $status) {
db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status); db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status);
} }
cache_clear_all();
case "modules": case "modules":
// Note: changing this also requires changing module_init() @ includes/module.inc. // Note: changing this also requires changing module_init() @ includes/module.inc.
$required = array("modules/user.module", "modules/system.module", "modules/watchdog.module"); $required = array("modules/user.module", "modules/system.module", "modules/watchdog.module");
...@@ -250,16 +245,19 @@ function system_admin() { ...@@ -250,16 +245,19 @@ function system_admin() {
foreach ($edit["status"] as $filename => $status) { foreach ($edit["status"] as $filename => $status) {
db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status); db_query("UPDATE system SET status = %d WHERE filename = '$filename'", $status);
} }
cache_clear_all();
case "themes": case "themes":
print system_listing("theme", "themes"); print system_listing("theme", "themes");
break; break;
case t("Reset to defaults"): case t("Reset to defaults"):
print status(system_default($edit)); print status(system_default($edit));
print system_view($type); print system_view($type);
cache_clear_all();
break; break;
case t("Save configuration"): case t("Save configuration"):
print status(system_save($edit)); print status(system_save($edit));
print system_view($type); print system_view($type);
cache_clear_all();
break; break;
default: default:
print system_view($type); print system_view($type);
...@@ -270,4 +268,4 @@ function system_admin() { ...@@ -270,4 +268,4 @@ function system_admin() {
} }
} }
?> ?>
\ No newline at end of file
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