[-] FO: Fix #PSCFV-4011
This commit is contained in:
1 parent
54a1607faf
commit
d062533388
2 files changed
+18
-3
No files matched your search
+17
-1
@@ -124,6 +124,9 @@ class LinkCore
|
|||||||
|
|
||||||
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'tags'))
|
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'tags'))
|
||||||
$params['tags'] = Tools::str2url($product->getTags($id_lang));
|
$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'))
|
if ($dispatcher->hasKeyword('product_rule', $id_lang, 'categories'))
|
||||||
{
|
{
|
||||||
@@ -441,7 +444,20 @@ class LinkCore
|
|||||||
$controller = Dispatcher::getInstance()->getController();
|
$controller = Dispatcher::getInstance()->getController();
|
||||||
if (!empty(Context::getContext()->controller->php_self))
|
if (!empty(Context::getContext()->controller->php_self))
|
||||||
$controller = 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);
|
return $this->getPageLink($controller, false, $id_lang, $params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -644,8 +644,7 @@ class FrontControllerCore extends Controller
|
|||||||
foreach ($query as $key => $value)
|
foreach ($query as $key => $value)
|
||||||
$params[Tools::safeOutput($key)] = Tools::safeOutput($value);
|
$params[Tools::safeOutput($key)] = Tools::safeOutput($value);
|
||||||
}
|
}
|
||||||
|
$excluded_key = array('isolang', 'id_lang', 'controller', 'fc', 'id_product', 'id_category', 'id_manufacturer', 'id_supplier', 'id_cms');
|
||||||
$excluded_key = array('isolang', 'id_lang', 'controller', 'fc');
|
|
||||||
foreach ($_GET as $key => $value)
|
foreach ($_GET as $key => $value)
|
||||||
if (!in_array($key, $excluded_key) && Validate::isUrl($key) && Validate::isUrl($value))
|
if (!in_array($key, $excluded_key) && Validate::isUrl($key) && Validate::isUrl($value))
|
||||||
$params[Tools::safeOutput($key)] = Tools::safeOutput($value);
|
$params[Tools::safeOutput($key)] = Tools::safeOutput($value);
|
||||||
|
|||||||
Reference in new issue
Block a user