[-] MO : fixed bugs on RSS modules

This commit is contained in:
Damien Metzger
2012-12-26 11:32:59 +01:00
parent 45bca9a189
commit 9dd5bd4098
5 changed files with 9 additions and 13 deletions
+4 -8
View File
@@ -35,7 +35,7 @@ class Feeder extends Module
{
$this->name = 'feeder';
$this->tab = 'front_office_features';
$this->version = 0.2;
$this->version = 0.3;
$this->author = 'PrestaShop';
$this->need_instance = 0;
@@ -48,17 +48,13 @@ class Feeder extends Module
function install()
{
if (!parent::install())
return false;
if (!$this->registerHook('header'))
return false;
return true;
return (parent::install() && $this->registerHook('header'));
}
function hookHeader($params)
{
$id_category = (int)(Tools::getValue('id_category'));
if (!$id_category)
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'))
{