Fix updating template menus on template change

This commit is contained in:
slawkens 2020-03-21 05:16:12 +01:00
parent ab94d0e752
commit df2d83b8a0

View File

@ -18,6 +18,12 @@ if($config['template_allow_change'])
if(!preg_match("/[^A-z0-9_\-]/", $template_name)) { // validate template
//setcookie('template', $template_name, 0, BASE_DIR . '/', $_SERVER["SERVER_NAME"]);
$template_name = $_GET['template'];
$cache = Cache::getInstance();
if($cache->enabled()) {
$cache->delete('template_menus');
}
setSession('template', $template_name);
header('Location:' . getSession('last_uri'));
}
@ -155,4 +161,4 @@ function get_template_menus() {
}
return $new_menus;
}
}