From: Michael M Slusarz Date: Sat, 28 Aug 2010 06:12:06 +0000 (-0600) Subject: PEAR_Error -> Exception X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2b90d9e34c288fd66d458a25e75d41ce01f8607b;p=horde.git PEAR_Error -> Exception --- 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; } }