[-] MO : Fix bug #PSCFI-7055 do not relay on ".html" in referer to find previous category
This commit is contained in:
@@ -53,10 +53,9 @@ class Feeder extends Module
|
||||
|
||||
function hookHeader($params)
|
||||
{
|
||||
|
||||
if (!($id_category = (int)Tools::getValue('id_category')))
|
||||
{
|
||||
if (isset($_SERVER['HTTP_REFERER']) && preg_match('!^(.*)\/([0-9]+)\-(.*[^\.])|(.*)id_category=([0-9]+)(.*)$!', $_SERVER['HTTP_REFERER'], $regs) && !strstr($_SERVER['HTTP_REFERER'], '.html'))
|
||||
if (isset($_SERVER['HTTP_REFERER']) && strstr($_SERVER['HTTP_REFERER'], Tools::getHttpHost()) && preg_match('!^(.*)\/([0-9]+)\-(.*[^\.])|(.*)id_category=([0-9]+)(.*)$!', $_SERVER['HTTP_REFERER'], $regs))
|
||||
{
|
||||
if (isset($regs[2]) && is_numeric($regs[2]))
|
||||
$id_category = (int)($regs[2]);
|
||||
|
||||
Reference in New Issue
Block a user