From f4509547db01d1de820679177640d38b7e1b577b Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Fri, 2 Jun 2017 12:56:49 +0200 Subject: [PATCH] Fix update stylesheet see #1998 --- main/inc/lib/display.lib.php | 1 + main/inc/lib/template.lib.php | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 6b11aa36bf..e4dcdd691d 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -87,6 +87,7 @@ class Display if (!empty(self::$preview_style)) { self::$global_template->preview_theme = self::$preview_style; + self::$global_template->set_system_parameters(); self::$global_template->setCssFiles(); self::$global_template->set_js_files(); self::$global_template->setCssCustomFiles(); diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php index f2c5ebca88..2042f356ea 100755 --- a/main/inc/lib/template.lib.php +++ b/main/inc/lib/template.lib.php @@ -526,9 +526,13 @@ class Template /** * Set system parameters */ - private function set_system_parameters() + public function set_system_parameters() { $this->theme = api_get_visual_theme(); + if (!empty($this->preview_theme)) { + $this->theme = $this->preview_theme; + } + $this->themeDir = self::getThemeDir($this->theme); // Setting app paths/URLs @@ -573,11 +577,6 @@ class Template { global $disable_js_and_css_files; $css = array(); - $this->theme = api_get_visual_theme(); - - if (!empty($this->preview_theme)) { - $this->theme = $this->preview_theme; - } // Default CSS Bootstrap $bowerCSSFiles = [