From: Michael M Slusarz Date: Thu, 9 Sep 2010 21:03:02 +0000 (-0600) Subject: consolidate some code X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a1f7f6d9e7dcbdc2d62e34f273bdb466f6810f2c;p=horde.git consolidate some code --- diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index e0fcc2dc0..6a2460e5f 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -1680,19 +1680,12 @@ HTML; if (!class_exists($hook_class)) { try { self::loadConfiguration('hooks.php', null, $app); - } catch (Horde_Exception $e) { - $error = true; - } - } - - if (class_exists($hook_class)) { - $hook_ob = new $hook_class; - $error = !method_exists($hook_ob, $hook); - } else { - $error = true; + } catch (Horde_Exception $e) {} } - if ($error) { + if (!class_exists($hook_class) || + !($hook_ob = new $hook_class) || + !method_exists($hook_ob, $hook)) { throw new Horde_Exception_HookNotSet(); }