From a50b0af067e43218bd908638fd3373822572a4a3 Mon Sep 17 00:00:00 2001 From: fSerny Date: Mon, 5 Dec 2011 12:56:43 +0000 Subject: [PATCH] [-] PROJECT : isHookableOn function is now retrocompatible with old hook git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10905 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Module.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/Module.php b/classes/Module.php index a11257176..6c354b717 100644 --- a/classes/Module.php +++ b/classes/Module.php @@ -1294,7 +1294,8 @@ abstract class ModuleCore */ public function isHookableOn($hook_name) { - return is_callable(array($this, 'hook'.ucfirst($hook_name))); + $hook_retro = Db::getInstance()->getValue('SELECT `alias` FROM `'._DB_PREFIX_.'hook_alias` where `name` = \''.pSQL($hook_name).'\''); + return (is_callable(array($this, 'hook'.ucfirst($hook_name))) || is_callable(array($this, 'hook'.ucfirst($hook_retro)))); } public function getPermission($variable, $employee = null)