From be4505041fc3ea03198085799aa83d579af66271 Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Mon, 31 Oct 2011 16:59:36 +0000 Subject: [PATCH] // maj theme gif img are now png if available (back office) git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9758 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/AdminController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/classes/AdminController.php b/classes/AdminController.php index ddd70b4ee..b635300cd 100644 --- a/classes/AdminController.php +++ b/classes/AdminController.php @@ -953,8 +953,12 @@ class AdminControllerCore extends Controller { if (Tab::checkTabRights($tab['id_tab']) === true) { - $img_exists_cache = Tools::file_exists_cache(_PS_ADMIN_DIR_.'/themes/'.$this->context->employee->bo_theme.'/img/t/'.$tab['class_name'].'.png'); - $img = ($img_exists_cache ? 'themes/'.Context::getContext()->employee->bo_theme.'/img/' : _PS_IMG_).'t/'.$tab['class_name'].'.png'; + $img_cache_url = 'themes/'.$this->context->employee->bo_theme.'/img/t/'.$tab['class_name'].'.png'; + $img_exists_cache = Tools::file_exists_cache(_PS_ADMIN_DIR_.$img_cache_url); + // retrocompatibility : change png to gif if icon not exists + if (!$img_exists_cache) + $img_exists_cache = Tools::file_exists_cache(_PS_ADMIN_DIR_.str_replace('.png', '.gif', $img_cache_url)); + $img = $img_exists_cache ? $img_cache_url : _PS_IMG_.'t/'.$tab['class_name'].'.png'; if (trim($tab['module']) != '') $img = _MODULE_DIR_.$tab['module'].'/'.$tab['class_name'].'.png';