From 67a0c96ea25f39673d8a60c53d053f9e75991206 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Fri, 9 Aug 2013 18:36:23 +0200 Subject: [PATCH] [-] CORE : getModuleLink not working on module custom route, merge from https://github.com/PrestaShop/PrestaShop/pull/487 thanks @zimmi1 --- classes/Link.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/Link.php b/classes/Link.php index 7946e2044..f93dc30fd 100644 --- a/classes/Link.php +++ b/classes/Link.php @@ -373,15 +373,18 @@ class LinkCore $shop = new Shop($id_shop); $url = $base.$shop->domain.$shop->getBaseURI().$this->getLangLink($id_lang); - // Set available keywords - $params['module'] = $module; - $params['controller'] = $controller ? $controller : 'default'; + // If the module has its own route ... just use it ! if (Dispatcher::getInstance()->hasRoute('module-'.$module.'-'.$controller, $id_lang, $id_shop)) return $this->getPageLink('module-'.$module.'-'.$controller, $ssl, $id_lang, $params); else + { + // Set available keywords + $params['module'] = $module; + $params['controller'] = $controller ? $controller : 'default'; return $url.Dispatcher::getInstance()->createUrl('module', $id_lang, $params, $this->allow, '', $id_shop); + } } /**