From 8588978e0308204eda5de901f8b4d56da286141a Mon Sep 17 00:00:00 2001 From: gRoussac Date: Fri, 12 Jul 2013 15:03:52 +0200 Subject: [PATCH] [*] FO : getCatImageLink doesn't work without type thanks @axometeam --- classes/Link.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/Link.php b/classes/Link.php index 9c5658ade..e5019b07a 100644 --- a/classes/Link.php +++ b/classes/Link.php @@ -482,7 +482,10 @@ class LinkCore public function getCatImageLink($name, $id_category, $type = null) { - $uri_path = ($this->allow == 1) ? (__PS_BASE_URI__.'c/'.$id_category.($type ? '-'.$type : '').'/'.$name.'.jpg') : (_THEME_CAT_DIR_.$id_category.($type ? '-'.$type : '').'.jpg'); + if($this->allow == 1 && $type) + $uri_path = __PS_BASE_URI__.'c/'.$id_category.'-'.$type.'/'.$name.'.jpg'; + else + $uri_path = _THEME_CAT_DIR_.$id_category.($type ? '-'.$type : '').'.jpg'; return $this->protocol_content.Tools::getMediaServer($uri_path).$uri_path; }