[-] PROJECT : isHookableOn function is now retrocompatible with old hook

This commit is contained in:
fSerny
2011-12-05 12:56:43 +00:00
parent ac0896fd2f
commit 982e305374
+2 -1
View File
@@ -1294,7 +1294,8 @@ abstract class ModuleCore
*/ */
public function isHookableOn($hook_name) 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) public function getPermission($variable, $employee = null)