From: Michael J. Rubinsky Date: Mon, 10 Aug 2009 23:49:54 +0000 (-0400) Subject: Fix callHook usage X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a376807a07e3a926ec0f08da95fc3b67f02aa941;p=horde.git Fix callHook usage --- diff --git a/ansel/img/upload.php b/ansel/img/upload.php index c975cdb16..5ef5fff1e 100644 --- a/ansel/img/upload.php +++ b/ansel/img/upload.php @@ -215,8 +215,6 @@ if ($form->validate($vars)) { // postupload hook if needed try { Horde::callHook('postupload', array($image_ids)); - } catch (Horde_Exception $e) { - // Error from within the hook. } catch (Horde_Exception_HookNotSet $e) {} $notification->push(sprintf(ngettext("%d photo was uploaded.", "%d photos were uploaded.", $uploaded), $uploaded), 'horde.success'); } elseif ($vars->get('submitbutton') != _("Cancel")) { diff --git a/ansel/lib/Api.php b/ansel/lib/Api.php index 810846f80..0a07cdadc 100644 --- a/ansel/lib/Api.php +++ b/ansel/lib/Api.php @@ -638,7 +638,9 @@ class Ansel_Api extends Horde_Registry_Api // Call the postupload hook if needed if (!empty($GLOBALS['conf']['hooks']['postupload']) && !$skiphook) { - Horde::callHook('_ansel_hook_postupload', array(array($image_id)), 'ansel'); + try { + Horde::callHook('postupload', array($image_id)); + } catch (Horde_Exception_HookNotSet $e) {} } return array('image_id' => (int)$image_id,