From 2b90d9e34c288fd66d458a25e75d41ce01f8607b Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 28 Aug 2010 00:12:06 -0600 Subject: [PATCH] PEAR_Error -> Exception --- turba/lib/Application.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/turba/lib/Application.php b/turba/lib/Application.php index 57cabf1a9..821b57cb4 100644 --- a/turba/lib/Application.php +++ b/turba/lib/Application.php @@ -387,13 +387,13 @@ class Turba_Application extends Horde_Registry_Application * * @param string $user Name of user to remove data for. * - * @return mixed true on success | PEAR_Error on failure + * @throws Horde_Exception */ public function removeUserData($user) { if (!$GLOBALS['registry']->isAdmin() && - $user != $GLOBALS['registry']->getAuth()) { - return PEAR::raiseError(_("You are not allowed to remove user data.")); + ($user != $GLOBALS['registry']->getAuth())) { + throw new Horde_Exception(_("You are not allowed to remove user data.")); } /* We need a clean copy of the $cfgSources array here.*/ @@ -455,10 +455,8 @@ class Turba_Application extends Horde_Registry_Application } if ($hasError) { - return PEAR::raiseError(sprintf(_("There was an error removing an address book for %s"), $user)); + throw new Horde_Exception(sprintf(_("There was an error removing an address book for %s"), $user)); } - - return true; } } -- 2.11.0