[-] CORE : getModuleLink not working on module custom route, merge from https://github.com/PrestaShop/PrestaShop/pull/487 thanks @zimmi1

This commit is contained in:
gRoussac
2013-08-09 18:36:23 +02:00
parent 41d29b5445
commit 67a0c96ea2
+6 -3
View File
@@ -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);
}
}
/**