[-] MO : fixed bugs on RSS modules
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>feeder</name>
|
||||
<displayName><![CDATA[RSS products feed]]></displayName>
|
||||
<version><![CDATA[0.2]]></version>
|
||||
<version><![CDATA[0.3]]></version>
|
||||
<description><![CDATA[Generate a RSS products feed]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
|
||||
@@ -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'))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user