forked from leftypol/leftypol
uncache themes on settings change
This commit is contained in:
parent
758cb94e01
commit
b78b3db010
1 changed files with 10 additions and 2 deletions
|
@ -2506,6 +2506,10 @@ function mod_theme_configure($theme_name) {
|
||||||
$query->bindValue(':theme', $theme_name);
|
$query->bindValue(':theme', $theme_name);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
|
// Clean cache
|
||||||
|
Cache::delete("themes");
|
||||||
|
Cache::delete("theme_settings_".$theme);
|
||||||
|
|
||||||
$result = true;
|
$result = true;
|
||||||
$message = false;
|
$message = false;
|
||||||
if (isset($theme['install_callback'])) {
|
if (isset($theme['install_callback'])) {
|
||||||
|
@ -2557,6 +2561,10 @@ function mod_theme_uninstall($theme_name) {
|
||||||
$query->bindValue(':theme', $theme_name);
|
$query->bindValue(':theme', $theme_name);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
|
// Clean cache
|
||||||
|
Cache::delete("themes");
|
||||||
|
Cache::delete("theme_settings_".$theme);
|
||||||
|
|
||||||
header('Location: ?/themes', true, $config['redirect_http']);
|
header('Location: ?/themes', true, $config['redirect_http']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue