diff --git a/ext/setup/main.php b/ext/setup/main.php index 3d001128..2af0b490 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -344,7 +344,6 @@ class Setup extends Extension $this->theme->display_page($page, $panel); } elseif ($event->page_matches("setup/save", method: "POST", permission: Permissions::CHANGE_SETTING)) { send_event(new ConfigSaveEvent($config, $event->POST)); - $config->save(); $page->flash("Config saved"); $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("setup")); @@ -407,11 +406,8 @@ class Setup extends Extension } } } + $config->save(); log_warning("setup", "Configuration updated"); - foreach (\Safe\glob("data/cache/*.css") as $css_cache) { - unlink($css_cache); - } - log_warning("setup", "Cache cleared"); } public function onCliGen(CliGenEvent $event): void diff --git a/ext/user_config/main.php b/ext/user_config/main.php index d3802d5b..37c24a9d 100644 --- a/ext/user_config/main.php +++ b/ext/user_config/main.php @@ -149,7 +149,6 @@ class UserConfig extends Extension $target_config = UserConfig::get_for_user($duser->id); send_event(new ConfigSaveEvent($target_config, $event->POST)); - $target_config->save(); $page->flash("Config saved"); $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("user_config"));