From 67c696a1ed1237c0fdd4d126b16bcb152610e53d Mon Sep 17 00:00:00 2001 From: fSerny Date: Mon, 2 Jul 2012 08:51:05 +0000 Subject: [PATCH] [-] MO : Fix hook name on differents modules - #PSCFV-2784 --- .../upgrade/php/module_reinstall_blockmyaccount.php | 2 +- install-dev/upgrade/php/module_reinstall_blocksearch.php | 2 +- modules/blockmyaccount/blockmyaccount.php | 4 ++-- modules/blockmyaccountfooter/blockmyaccountfooter.php | 8 ++++---- modules/blockwishlist/blockwishlist.php | 4 ++-- modules/loyalty/loyalty.php | 4 ++-- modules/referralprogram/referralprogram.php | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/install-dev/upgrade/php/module_reinstall_blockmyaccount.php b/install-dev/upgrade/php/module_reinstall_blockmyaccount.php index 02de9a8e3..fa7968674 100644 --- a/install-dev/upgrade/php/module_reinstall_blockmyaccount.php +++ b/install-dev/upgrade/php/module_reinstall_blockmyaccount.php @@ -33,7 +33,7 @@ function module_reinstall_blockmyaccount() { $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES - ("myAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)'); + ("displayMyAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)'); // register left column, and header, and addmyaccountblockhook $hooks = array('leftColumn', 'header'); foreach($hooks as $hook_name) diff --git a/install-dev/upgrade/php/module_reinstall_blocksearch.php b/install-dev/upgrade/php/module_reinstall_blocksearch.php index caabc7834..0cb6ad8d9 100644 --- a/install-dev/upgrade/php/module_reinstall_blocksearch.php +++ b/install-dev/upgrade/php/module_reinstall_blocksearch.php @@ -33,7 +33,7 @@ function module_reinstall_blocksearch() { $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES - ("myAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)'); + ("displayMyAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)'); // register left column, and header, and addmyaccountblockhook $hooks = array('top', 'header'); foreach($hooks as $hook_name) diff --git a/modules/blockmyaccount/blockmyaccount.php b/modules/blockmyaccount/blockmyaccount.php index e208caed2..c4dee7a72 100644 --- a/modules/blockmyaccount/blockmyaccount.php +++ b/modules/blockmyaccount/blockmyaccount.php @@ -84,12 +84,12 @@ class BlockMyAccount extends Module private function addMyAccountBlockHook() { - return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlock\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)'); + return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'displayMyAccountBlock\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)'); } private function removeMyAccountBlockHook() { - return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlock\''); + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'displayMyAccountBlock\''); } public function hookDisplayHeader($params) diff --git a/modules/blockmyaccountfooter/blockmyaccountfooter.php b/modules/blockmyaccountfooter/blockmyaccountfooter.php index ab67980bd..e243c34c3 100644 --- a/modules/blockmyaccountfooter/blockmyaccountfooter.php +++ b/modules/blockmyaccountfooter/blockmyaccountfooter.php @@ -65,7 +65,7 @@ class Blockmyaccountfooter extends Module $smarty->assign(array( 'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')), 'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')), - 'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('myAccountBlock') + 'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('displayMyAccountBlock') )); return $this->display(__FILE__, $this->name.'.tpl'); } @@ -77,12 +77,12 @@ class Blockmyaccountfooter extends Module private function addMyAccountBlockHook() { - return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlockfooter\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)'); + return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'displayMyAccountBlockfooter\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)'); } private function removeMyAccountBlockHook() { - return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlockfooter\''); + return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'displayMyAccountBlockfooter\''); } public function hookHeader($params) @@ -97,7 +97,7 @@ class Blockmyaccountfooter extends Module $smarty->assign(array( 'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')), 'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')), - 'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('myAccountBlock') + 'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('displayMyAccountBlock') )); return $this->display(__FILE__, $this->name.'.tpl'); } diff --git a/modules/blockwishlist/blockwishlist.php b/modules/blockwishlist/blockwishlist.php index c2fd39816..9298353c5 100644 --- a/modules/blockwishlist/blockwishlist.php +++ b/modules/blockwishlist/blockwishlist.php @@ -72,7 +72,7 @@ class BlockWishList extends Module ) return false; /* This hook is optional */ - $this->registerHook('myAccountBlock'); + $this->registerHook('displayMyAccountBlock'); return true; } @@ -225,7 +225,7 @@ class BlockWishList extends Module return $this->display(__FILE__, 'my-account.tpl'); } - public function hookMyAccountBlock($params) + public function hookDisplayMyAccountBlock($params) { return $this->hookCustomerAccount($params); } diff --git a/modules/loyalty/loyalty.php b/modules/loyalty/loyalty.php index 353a6490e..f18f0d0fe 100644 --- a/modules/loyalty/loyalty.php +++ b/modules/loyalty/loyalty.php @@ -90,7 +90,7 @@ class Loyalty extends Module Configuration::updateValue('PS_LOYALTY_VOUCHER_CATEGORY', $category_config); /* This hook is optional */ - $this->registerHook('myAccountBlock'); + $this->registerHook('displayMyAccountBlock'); if (!LoyaltyStateModule::insertDefaultData()) return false; return true; @@ -475,7 +475,7 @@ class Loyalty extends Module return $this->display(__FILE__, 'my-account.tpl'); } - public function hookMyAccountBlock($params) + public function hookDisplayMyAccountBlock($params) { return $this->hookCustomerAccount($params); } diff --git a/modules/referralprogram/referralprogram.php b/modules/referralprogram/referralprogram.php index ea7c50f0d..ab7aca878 100644 --- a/modules/referralprogram/referralprogram.php +++ b/modules/referralprogram/referralprogram.php @@ -77,7 +77,7 @@ class ReferralProgram extends Module Configuration::updateValue('REFERRAL_PERCENTAGE', 5); /* This hook is optional */ - $this->registerHook('myAccountBlock'); + $this->registerHook('displayMyAccountBlock'); return true; } @@ -387,7 +387,7 @@ class ReferralProgram extends Module return $this->display(__FILE__, 'my-account.tpl'); } - public function hookMyAccountBlock($params) + public function hookDisplayMyAccountBlock($params) { return $this->hookCustomerAccount($params); }