// Allow to force routes #PSCFV-2592

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15711 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-05-28 13:41:00 +00:00
parent 2c3b45ff44
commit cc179c3a49
4 changed files with 46 additions and 12 deletions
+3 -2
View File
@@ -76,7 +76,7 @@ class LinkCore
* @param int $ipa ID product attribute
* @return string
*/
public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0)
public function getProductLink($product, $alias = null, $category = null, $ean13 = null, $id_lang = null, $id_shop = null, $ipa = 0, $force_routes = false)
{
$dispatcher = Dispatcher::getInstance();
$url = _PS_BASE_URL_.__PS_BASE_URI__;
@@ -129,7 +129,7 @@ class LinkCore
}
$anchor = $ipa ? $product->getAnchor($ipa) : '';
return $url.$dispatcher->createUrl('product_rule', $params, $this->allow, $anchor);
return $url.$dispatcher->createUrl('product_rule', $params, $force_routes, $anchor);
}
/**
@@ -532,6 +532,7 @@ class LinkCore
{
if (!$context)
$context = Context::getContext();
var_dump(Language::isMultiLanguageActivated());
if (!$this->allow || !Language::isMultiLanguageActivated())
return '';