From a376807a07e3a926ec0f08da95fc3b67f02aa941 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 10 Aug 2009 19:49:54 -0400 Subject: [PATCH] Fix callHook usage --- ansel/img/upload.php | 2 -- ansel/lib/Api.php | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) 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, -- 2.11.0