From 678a18f2db14a87ba5be0d36bf4e782f46b958ef Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 8 Nov 2010 15:37:58 -0500 Subject: [PATCH] use the runCallback method --- framework/Share/lib/Horde/Share.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/framework/Share/lib/Horde/Share.php b/framework/Share/lib/Horde/Share.php index f339e3c54..2fa527300 100644 --- a/framework/Share/lib/Horde/Share.php +++ b/framework/Share/lib/Horde/Share.php @@ -285,7 +285,7 @@ class Horde_Share // Run the results through the callback, if configured. if (!empty($this->_callbacks['list'])) { - return call_user_func_array($this->_callbacks['list'], array($userid, $shares, $params)); + return $this->runCallback('list', array($userid, $shares, $params)); } return $shares; @@ -353,10 +353,7 @@ class Horde_Share public function addShare(Horde_Share_Object $share) { // Run the results through the callback, if configured. - if (!empty($this->_callbacks['add'])) { - call_user_func($this->_callbacks['add'], $share); - } - + $this->runCallback('add', array($share)); $result = $this->_addShare($share); /* Store new share in the caches. */ @@ -381,9 +378,7 @@ class Horde_Share public function removeShare(Horde_Share_Object $share) { // Run the results through the callback, if configured. - if (!empty($this->_callbacks['remove'])) { - call_user_func($this->_callbacks['remove'], $share); - } + $this->runCallback('remove', array($share)); /* Remove share from the caches. */ $id = $share->getId(); -- 2.11.0