From df2d83b8a0bb30fc4c60ea73e2e343ad744d7c94 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 21 Mar 2020 05:16:12 +0100 Subject: [PATCH] Fix updating template menus on template change --- system/template.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/template.php b/system/template.php index 66067c7b..773bbe24 100644 --- a/system/template.php +++ b/system/template.php @@ -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; -} \ No newline at end of file +}