From 8dd951c2df966d4ba6650bd90d2e4a8b31a56a93 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 11 Nov 2013 00:36:17 +0100 Subject: [PATCH] [*] MO : Remove calls to isRegisteredInHook in crossselling and productscategory --- modules/crossselling/crossselling.php | 3 --- modules/crossselling/upgrade/install-0.8.php | 11 +++++++++++ modules/productscategory/productscategory.php | 3 --- modules/productscategory/upgrade/install-1.5.php | 11 +++++++++++ 4 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 modules/crossselling/upgrade/install-0.8.php create mode 100644 modules/productscategory/upgrade/install-1.5.php diff --git a/modules/crossselling/crossselling.php b/modules/crossselling/crossselling.php index ec157f73d..9381da964 100755 --- a/modules/crossselling/crossselling.php +++ b/modules/crossselling/crossselling.php @@ -43,9 +43,6 @@ class CrossSelling extends Module $this->displayName = $this->l('Cross Selling'); $this->description = $this->l('Customers who bought this product also bought:'); - - if (!$this->isRegisteredInHook('header')) - $this->registerHook('header'); } public function install() diff --git a/modules/crossselling/upgrade/install-0.8.php b/modules/crossselling/upgrade/install-0.8.php new file mode 100644 index 000000000..1ee79f5e5 --- /dev/null +++ b/modules/crossselling/upgrade/install-0.8.php @@ -0,0 +1,11 @@ +isRegisteredInHook('header')) + return $object->registerHook('header'); + return true; +} diff --git a/modules/productscategory/productscategory.php b/modules/productscategory/productscategory.php index 2210074ef..6290c5546 100644 --- a/modules/productscategory/productscategory.php +++ b/modules/productscategory/productscategory.php @@ -43,9 +43,6 @@ class productsCategory extends Module $this->displayName = $this->l('Products Category'); $this->description = $this->l('Display products of the same category on the product page.'); - - if (!$this->isRegisteredInHook('header')) - $this->registerHook('header'); } public function install() diff --git a/modules/productscategory/upgrade/install-1.5.php b/modules/productscategory/upgrade/install-1.5.php new file mode 100644 index 000000000..96e31c4c9 --- /dev/null +++ b/modules/productscategory/upgrade/install-1.5.php @@ -0,0 +1,11 @@ +isRegisteredInHook('header')) + return $object->registerHook('header'); + return true; +}