mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fix updating template menus on template change
This commit is contained in:
parent
ab94d0e752
commit
df2d83b8a0
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user