[-] FO: Fix #PSCFV-4011
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17301 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+17
-1
@@ -124,6 +124,9 @@ class LinkCore
|
||||
|
||||
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'tags'))
|
||||
$params['tags'] = Tools::str2url($product->getTags($id_lang));
|
||||
|
||||
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'reference'))
|
||||
$params['reference'] = Tools::str2url($product->reference);
|
||||
|
||||
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'categories'))
|
||||
{
|
||||
@@ -441,7 +444,20 @@ class LinkCore
|
||||
$controller = Dispatcher::getInstance()->getController();
|
||||
if (!empty(Context::getContext()->controller->php_self))
|
||||
$controller = Context::getContext()->controller->php_self;
|
||||
|
||||
|
||||
if ($controller == 'product' && isset($params['id_product']))
|
||||
return $this->getProductLink((int)$params['id_product'], null, null, null, (int)$id_lang);
|
||||
elseif ($controller == 'category' && isset($params['id_category']))
|
||||
return $this->getCategoryLink((int)$params['id_category'], null, (int)$id_lang);
|
||||
elseif ($controller == 'supplier' && isset($params['id_supplier']))
|
||||
return $this->getSupplierLink((int)$params['id_supplier'], null, (int)$id_lang);
|
||||
elseif ($controller == 'manufacturer' && isset($params['id_manufacturer']))
|
||||
return $this->getManufacturerLink((int)$params['id_manufacturer'], null, (int)$id_lang);
|
||||
elseif ($controller == 'cms' && isset($params['id_cms']))
|
||||
return $this->getCMSLink((int)$params['id_cms'], null, false, (int)$id_lang);
|
||||
elseif ($controller == 'cms' && isset($params['id_cms_category']))
|
||||
return $this->getCMSCategoryLink((int)$params['id_cms_category'], null, (int)$id_lang);
|
||||
|
||||
return $this->getPageLink($controller, false, $id_lang, $params);
|
||||
}
|
||||
|
||||
|
||||
@@ -644,8 +644,7 @@ class FrontControllerCore extends Controller
|
||||
foreach ($query as $key => $value)
|
||||
$params[Tools::safeOutput($key)] = Tools::safeOutput($value);
|
||||
}
|
||||
|
||||
$excluded_key = array('isolang', 'id_lang', 'controller', 'fc');
|
||||
$excluded_key = array('isolang', 'id_lang', 'controller', 'fc', 'id_product', 'id_category', 'id_manufacturer', 'id_supplier', 'id_cms');
|
||||
foreach ($_GET as $key => $value)
|
||||
if (!in_array($key, $excluded_key) && Validate::isUrl($key) && Validate::isUrl($value))
|
||||
$params[Tools::safeOutput($key)] = Tools::safeOutput($value);
|
||||
|
||||
Reference in New Issue
Block a user