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 +}