Permalink
Browse files

[-] CORE : fixed bug #PSCFV-8035 - 'auth' hook exception is not working

  • Loading branch information...
1 parent ba62406 commit 06c1b3537b419731f454fe6c678a3835a39dbb2e @vAugagneur vAugagneur committed Mar 26, 2013
Showing with 11 additions and 1 deletion.
  1. +11 −1 classes/Hook.php
View
@@ -393,7 +393,17 @@ public static function exec($hook_name, $hook_args = array(), $id_module = null,
if ($check_exceptions)
{
$exceptions = $moduleInstance->getExceptions($array['id_hook']);
- if (in_array(Dispatcher::getInstance()->getController(), $exceptions))
+ $controller = Dispatcher::getInstance()->getController();
+
+ if (in_array($controller, $exceptions))
+ continue;
+
+ //retro compat of controller names
+ $matching_name = array(
+ 'authentication' => 'auth',
+ 'compare' => 'products-comparison',
+ );
+ if (isset($matching_name[$controller]) && in_array($matching_name[$controller], $exceptions))
continue;
if (Validate::isLoadedObject($context->employee) && !$moduleInstance->getPermission('view', $context->employee))
continue;

0 comments on commit 06c1b35

Please sign in to comment.