From 69c306e2440261c85ab6bd41c569c8f5e7c2c9da Mon Sep 17 00:00:00 2001 From: dMetzger Date: Tue, 25 Sep 2012 09:20:01 +0000 Subject: [PATCH] [-] BO : strange behaviour with the admin path fixed #PSCFV-4354 --- classes/controller/AdminController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index 6acb4f6f3..57d33d40d 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -1582,7 +1582,9 @@ class AdminControllerCore extends Controller public function setMedia() { $this->addCSS(_PS_CSS_DIR_.'admin.css', 'all'); - $this->addCSS(__PS_BASE_URI__.str_ireplace(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR, '', _PS_ADMIN_DIR_).'/themes/'.$this->bo_theme.'/css/admin.css', 'all'); + $admin_webpath = str_ireplace(_PS_ROOT_DIR_, '', _PS_ADMIN_DIR_); + $admin_webpath = preg_replace('/^'.preg_quote(DIRECTORY_SEPARATOR, '/').'/', '', $admin_webpath); + $this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/admin.css', 'all'); if ($this->context->language->is_rtl) $this->addCSS(_THEME_CSS_DIR_.'rtl.css');