From dc4f17b3007a67cf8a46aa84d7f9768c90e47c6a Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 12 Aug 2010 13:31:53 -0600 Subject: [PATCH] Don't call Horde::fatal() directly --- agora/forums.php | 2 +- agora/lib/Messages.php | 9 +++++---- agora/rss/threads.php | 6 +++--- ansel/map_edit.php | 2 +- beatnik/lib/Driver/ldap2dns.php | 5 +++-- gollem/lib/Auth.php | 2 +- hermes/deliverables.php | 4 ++-- horde/docs/CODING_STANDARDS | 2 +- hylax/compose.php | 2 +- hylax/lib/Driver.php | 4 ++-- hylax/lib/Image.php | 6 ++++-- hylax/lib/Storage.php | 13 ++++--------- jonah/channels/aggregate.php | 4 ++-- luxor/symbol.php | 2 +- nag/quick.php | 18 ++++++++++-------- .../2006-04-18_add_creator_and_assignee_fields.php | 4 ++-- nag/tasks/index.php | 4 ++-- passwd/lib/Driver.php | 5 +++-- shout/lib/Driver/Ldap.php | 3 ++- trean/browse.php | 8 ++++---- trean/lib/Application.php | 4 ++-- trean/lib/Bookmarks.php | 2 +- trean/lib/Trean.php | 4 ++-- vilma/lib/Driver.php | 5 +++-- vilma/lib/Driver/qmailldap.php | 9 ++++----- whups/admin/index.php | 4 ++-- whups/data.php | 4 ++-- whups/search/rss.php | 6 +++--- wicked/display.php | 4 ++-- 29 files changed, 75 insertions(+), 72 deletions(-) diff --git a/agora/forums.php b/agora/forums.php index 187a40529..2181d6d9c 100644 --- a/agora/forums.php +++ b/agora/forums.php @@ -42,7 +42,7 @@ $forum_start = $forum_page * $forums_per_page; /* Get the list of forums. */ $forums_list = $forums->getForums(0, true, $sort_by, $sort_dir, true, $forum_start, $forums_per_page); if ($forums_list instanceof PEAR_Error) { - Horde::fatal($forums_list, __FILE__, __LINE__); + throw new Horde_Exception($forums_list); } elseif (empty($forums_list)) { $forums_count = 0; } else { diff --git a/agora/lib/Messages.php b/agora/lib/Messages.php index c0c02f5d7..534687fc3 100644 --- a/agora/lib/Messages.php +++ b/agora/lib/Messages.php @@ -2220,7 +2220,8 @@ class Agora_Messages { /** * Attempts to open a persistent connection to the SQL server. * - * @return boolean True on success; exits (Horde::fatal()) on error. + * @return boolean True on success. + * @throws Horde_Exception */ private function _connect() { @@ -2233,14 +2234,14 @@ class Agora_Messages { $this->_write_db = MDB2::factory($this->_params); if ($this->_write_db instanceof PEAR_Error) { - Horde::fatal($this->_write_db, __FILE__, __LINE__); + throw new Horde_Exception($this->_write_db); } if (!empty($params['splitread'])) { $params = array_merge($this->_params, $this->_params['read']); $this->_db = MDB2::factory($this->_params); if ($this->_db instanceof PEAR_Error) { - Horde::fatal($this->_db, __FILE__, __LINE__); + throw new Horde_Exception($this->_db); } } else { /* Default to the same DB handle for the writer too. */ @@ -2249,7 +2250,7 @@ class Agora_Messages { $this->_db->loadModule('Extended'); if ($this->_db instanceof PEAR_Error) { - Horde::fatal($this->_db, __FILE__, __LINE__); + throw new Horde_Exception($this->_db); } $this->_db->setFetchMode(MDB2_FETCHMODE_ASSOC); diff --git a/agora/rss/threads.php b/agora/rss/threads.php index f95b988cc..999f7913e 100644 --- a/agora/rss/threads.php +++ b/agora/rss/threads.php @@ -41,18 +41,18 @@ if (!$rss) { // Get forum title $threads = Agora_Messages::singleton($scope, $forum_id); if ($threads instanceof PEAR_Error) { - Horde::fatal($threads, __FILE__, __LINE__); + throw new Horde_Exception($threads); } if ($scope == 'agora') { $forum_array = $threads->getForum(); if ($forum_array instanceof PEAR_Error) { - Horde::fatal($forum_array, __FILE__, __LINE__); + throw new Horde_Exception($forum_array); } $title = sprintf(_("Threads in %s"), $forum_array['forum_name']); } else { $title = $registry->callByPackage($scope, 'commentCallback', array($forum_name, 'title')); if ($title instanceof PEAR_Error) { - Horde::fatal($title, __FILE__, __LINE__); + throw new Horde_Exception($title); } $title = sprintf(_("Comments on %s"), $title); } diff --git a/ansel/map_edit.php b/ansel/map_edit.php index d722014c8..64588c699 100644 --- a/ansel/map_edit.php +++ b/ansel/map_edit.php @@ -20,7 +20,7 @@ $image_id = Horde_Util::getFormData('image'); /* Sanity checks, perms etc... */ if (empty($image_id)) { - Horde::fatal(_("An error has occured retrieving the image. Details have been logged."), __FILE__, __LINE__, true); + throw new Ansel_Exception(_("An error has occured retrieving the image. Details have been logged.")); } $image = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getImage($image_id); $gallery = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($image->gallery); diff --git a/beatnik/lib/Driver/ldap2dns.php b/beatnik/lib/Driver/ldap2dns.php index ddb4e56e5..029d4f57e 100644 --- a/beatnik/lib/Driver/ldap2dns.php +++ b/beatnik/lib/Driver/ldap2dns.php @@ -491,7 +491,8 @@ class Beatnik_Driver_ldap2dns extends Beatnik_Driver * * @access private * - * @return boolean True on success; exits (Horde::fatal()) on error. + * @return boolean True on success. + * @throws Beatnik_Exception * * @access private */ @@ -506,7 +507,7 @@ class Beatnik_Driver_ldap2dns extends Beatnik_Driver $this->_LDAP = ldap_connect($this->_params['hostspec'], $port); if (!$this->_LDAP) { - Horde::fatal("Unable to connect to LDAP server $hostname on $port", __FILE__, __LINE__); + throw new Beatnik_Exception("Unable to connect to LDAP server $hostname on $port"); } $res = ldap_set_option($this->_LDAP, LDAP_OPT_PROTOCOL_VERSION, $this->_params['version']); if ($res === false) { diff --git a/gollem/lib/Auth.php b/gollem/lib/Auth.php index ba9294ca6..3af1ff1a8 100644 --- a/gollem/lib/Auth.php +++ b/gollem/lib/Auth.php @@ -88,7 +88,7 @@ class Gollem_Auth // Allocate a global VFS object $GLOBALS['gollem_vfs'] = Gollem::getVFSOb($_SESSION['gollem']['backend_key']); if (is_a($GLOBALS['gollem_vfs'], 'PEAR_Error')) { - Horde::fatal($GLOBALS['gollem_vfs']); + throw new Horde_Exception($GLOBALS['gollem_vfs']); } $valid = $GLOBALS['gollem_vfs']->checkCredentials(); diff --git a/hermes/deliverables.php b/hermes/deliverables.php index e6721a88e..46ebffc25 100644 --- a/hermes/deliverables.php +++ b/hermes/deliverables.php @@ -69,7 +69,7 @@ if ($vars->exists('deliverable_id') || $vars->exists('new')) { if ($vars->exists('deliverable_id')) { $deliverable = $hermes->driver->getDeliverableByID($vars->get('deliverable_id')); if (is_a($deliverable, 'PEAR_Error')) { - Horde::fatal($deliverable, __FILE__, __LINE__); + throw new Hermes_Exception($deliverable); } foreach ($deliverable as $name => $value) { @@ -85,7 +85,7 @@ if ($vars->exists('deliverable_id') || $vars->exists('new')) { $deliverables = $hermes->driver->listDeliverables(array('client_id' => $vars->get('client_id'))); if (is_a($deliverables, 'PEAR_Error')) { - Horde::fatal($deliverables, __FILE__, __LINE__); + throw new Hermes_Exception($deliverables); } $tree = $GLOBALS['injector']->getInstance('Horde_Tree')->getTree('deliverables', 'Javascript'); diff --git a/horde/docs/CODING_STANDARDS b/horde/docs/CODING_STANDARDS index 39771bb91..40733e17a 100644 --- a/horde/docs/CODING_STANDARDS +++ b/horde/docs/CODING_STANDARDS @@ -678,7 +678,7 @@ e. Use `array_key_exists()`_ when you want to check if an array key is defined // Make sure we have a charset parameter. Value could also be null. if (!array_key_exists('charset', $params)) { - Horde::fatal('Incomplete configuration.'); + throw new Horde_Exception('Incomplete configuration'); } Please note that `array_key_exists()`_ is a performance hit (25%-100%) and diff --git a/hylax/compose.php b/hylax/compose.php index 82218feb7..1d7bd1fb7 100644 --- a/hylax/compose.php +++ b/hylax/compose.php @@ -24,7 +24,7 @@ foreach ($_covers as $id => $cover) { $tpl = Horde_Util::getFormData('template', 'default'); if (empty($_covers[$tpl])) { - Horde::fatal(_("The requested Cover Page does not exist."), __FILE__, __LINE__); + throw new Horde_Exception(_("The requested Cover Page does not exist.")); } /* Load Form Actions */ diff --git a/hylax/lib/Driver.php b/hylax/lib/Driver.php index c22eb30c9..30034d7bd 100644 --- a/hylax/lib/Driver.php +++ b/hylax/lib/Driver.php @@ -50,9 +50,9 @@ class Hylax_Driver { if (class_exists($class)) { $hylax = new $class($params); return $hylax; - } else { - Horde::fatal(PEAR::raiseError(sprintf(_("No such backend \"%s\" found"), $driver)), __FILE__, __LINE__); } + + throw new Horde_Exception(sprintf(_("No such backend \"%s\" found"), $driver)); } /** diff --git a/hylax/lib/Image.php b/hylax/lib/Image.php index b6a5d4a01..af18562c5 100644 --- a/hylax/lib/Image.php +++ b/hylax/lib/Image.php @@ -119,6 +119,7 @@ class Hylax_Image { * * @return Hylax_Image The newly created concrete Hylax_Image instance, or * false on an error. + * @throws Horde_Exception */ function &factory($driver, $params = array()) { @@ -128,8 +129,9 @@ class Hylax_Image { if (class_exists($class)) { $image = &new $class($params); return $image; - } else { - Horde::fatal(PEAR::raiseError(sprintf(_("No such backend \"%s\" found"), $driver)), __FILE__, __LINE__); + } + + throw new Horde_Exception(sprintf(_("No such backend \"%s\" found"), $driver)); } } diff --git a/hylax/lib/Storage.php b/hylax/lib/Storage.php index 7d9ff7e03..cba6875e7 100644 --- a/hylax/lib/Storage.php +++ b/hylax/lib/Storage.php @@ -28,17 +28,11 @@ class Hylax_Storage { * Constructor * * @param array $params Any parameters needed for this storage driver. - * @throws VFS_Exception + * @throws Horde_Exception */ function Hylax_Storage($params) { $this->_params = $params; - - /* Set up the VFS storage. */ - if (!isset($GLOBALS['conf']['vfs']['type'])) { - Horde::fatal(_("You must configure a VFS backend to use Hylax."), __FILE__, __LINE__); - } - $this->_vfs = $GLOBALS['injector']->getInstance('Horde_Vfs')->getVfs(); } @@ -145,6 +139,7 @@ class Hylax_Storage { * * @return Hylax_Storage The newly created concrete Hylax_Storage * instance, or false on error. + * @throws Horde_Exception */ function &factory($driver, $params = array()) { @@ -154,9 +149,9 @@ class Hylax_Storage { if (class_exists($class)) { $storage = new $class($params); return $storage; - } else { - Horde::fatal(PEAR::raiseError(sprintf(_("No such backend \"%s\" found"), $driver)), __FILE__, __LINE__); } + + throw new Horde_Exception(sprintf(_("No such backend \"%s\" found"), $driver)); } /** diff --git a/jonah/channels/aggregate.php b/jonah/channels/aggregate.php index feea1ffa7..436dee5a1 100644 --- a/jonah/channels/aggregate.php +++ b/jonah/channels/aggregate.php @@ -28,8 +28,8 @@ $vars = Horde_Variables::getDefaultVariables(); /* Set up some variables. */ $channel_id = $vars->get('channel_id'); $channel = $news->getChannel($channel_id); -if (is_a($channel, 'PEAR_Error')) { - Horde::fatal($channel, __FILE__, __LINE__); +if ($channel instanceof PEAR_Error) { + throw new Jonah_Exception($channel); } $channel_name = $channel['channel_name']; $ids = preg_split('/:/', $channel['channel_url'], -1, PREG_SPLIT_NO_EMPTY); diff --git a/luxor/symbol.php b/luxor/symbol.php index a25c09e6e..72bcee501 100644 --- a/luxor/symbol.php +++ b/luxor/symbol.php @@ -19,7 +19,7 @@ $ident = Horde_Util::getFormData('i'); // Change source if the symbol isn't from the current source. $symbolSource = $index->getSourceBySymbol($ident); if (!$symbolSource) { - Horde::fatal(_("Symbol not found"), __FILE__, __LINE__); + throw new Horde_Exception(_("Symbol not found")); } if ($symbolSource != $sourceid) { $source = $sources[$symbolSource]; diff --git a/nag/quick.php b/nag/quick.php index 5b6fe3db0..08af7ac3a 100644 --- a/nag/quick.php +++ b/nag/quick.php @@ -5,13 +5,15 @@ Horde_Registry::appInit('nag'); if ($quickText = Horde_Util::getPost('quickText')) { $result = $registry->tasks->quickAdd($quickText); - if ($result) { - if (count($result) == 1) { - $notification->push(_("Added one task"), 'horde.success'); - } else { - $notification->push(sprintf(_("Added %s tasks"), count($result)), 'horde.success'); - } - Horde::applicationUrl('list.php', true)->redirect(); + if (!$result) { + throw new Nag_Exception($result); } - Horde::fatal($result); + + if (count($result) == 1) { + $notification->push(_("Added one task"), 'horde.success'); + } else { + $notification->push(sprintf(_("Added %s tasks"), count($result)), 'horde.success'); + } + + Horde::applicationUrl('list.php', true)->redirect(); } diff --git a/nag/scripts/upgrades/2006-04-18_add_creator_and_assignee_fields.php b/nag/scripts/upgrades/2006-04-18_add_creator_and_assignee_fields.php index 444d76990..ba079edc4 100755 --- a/nag/scripts/upgrades/2006-04-18_add_creator_and_assignee_fields.php +++ b/nag/scripts/upgrades/2006-04-18_add_creator_and_assignee_fields.php @@ -50,8 +50,8 @@ foreach ($tasklists as $tasklist => $share) { while ($task = $tasks->each()) { $values = array($owner, $task->id, $task->tasklist); $result = $db->execute($sth, $values); - if (is_a($result, 'PEAR_Error')) { - Horde::fatal($result, __FILE__, __LINE__); + if ($result instanceof PEAR_Error) { + throw new Nag_Exception($result); } } } diff --git a/nag/tasks/index.php b/nag/tasks/index.php index 45cc4dde4..eb3cef4fa 100644 --- a/nag/tasks/index.php +++ b/nag/tasks/index.php @@ -21,8 +21,8 @@ $tasks = Nag::listTasks( $prefs->getValue('altsortby'), null, 1); -if (is_a($tasks, 'PEAR_Error')) { - Horde::fatal($tasks); +if ($tasks instanceof PEAR_Error) { + throw new Nag_Exception($tasks); } $search_pattern = '/^' . preg_quote($search, '/') . '/i'; diff --git a/passwd/lib/Driver.php b/passwd/lib/Driver.php index 9c5aba9ca..622a71986 100644 --- a/passwd/lib/Driver.php +++ b/passwd/lib/Driver.php @@ -116,6 +116,7 @@ class Passwd_Driver { * * @return mixed The newly created concrete Passwd_Driver * instance, or false on an error. + * @throws Passwd_Exception */ function factory($driver, $params = array()) { @@ -124,9 +125,9 @@ class Passwd_Driver { $class = 'Passwd_Driver_' . $driver; if (class_exists($class)) { return new $class($params); - } else { - Horde::fatal(PEAR::raiseError(sprintf(_("No such backend \"%s\" found."), $driver)), __FILE__, __LINE__); } + + throw new Passwd_Exception(sprintf(_("No such backend \"%s\" found."), $driver)); } } diff --git a/shout/lib/Driver/Ldap.php b/shout/lib/Driver/Ldap.php index 2d5d821d9..084b8149d 100644 --- a/shout/lib/Driver/Ldap.php +++ b/shout/lib/Driver/Ldap.php @@ -436,7 +436,8 @@ class Shout_Driver_Ldap extends Shout_Driver /** * Attempts to open a connection to the LDAP server. * - * @return boolean True on success; exits (Horde::fatal()) on error. + * @return boolean True on success. + * @throws Shout_Exception * * @access private */ diff --git a/trean/browse.php b/trean/browse.php index f212500ae..e325b323c 100644 --- a/trean/browse.php +++ b/trean/browse.php @@ -24,9 +24,9 @@ $folderId = Horde_Util::getFormData('f'); if (empty($folderId) && $registry->getAuth()) { $folderId = $trean_shares->getId($registry->getAuth()); $folder = &$trean_shares->getFolder($folderId); - if (is_a($folder, 'PEAR_Error')) { + if ($folder instanceof PEAR_Error) { /* Can't redirect back to browse since that would set up a loop. */ - Horde::fatal($folder, __FILE__, __LINE__, true); + throw new Horde_Exception($folder); } } elseif (empty($folderId)) { /* We're accessing Trean as a guest, try to get a folder to browse */ @@ -36,9 +36,9 @@ if (empty($folderId) && $registry->getAuth()) { } } else { $folder = &$trean_shares->getFolder($folderId); - if (is_a($folder, 'PEAR_Error')) { + if ($folder instanceof PEAR_Error) { /* Can't redirect back to browse since that would set up a loop. */ - Horde::fatal($folder, __FILE__, __LINE__, true); + throw new Horde_Exception($folder); } /* Make sure user has permission to view this folder. */ diff --git a/trean/lib/Application.php b/trean/lib/Application.php index 53b52ada3..12129bae8 100644 --- a/trean/lib/Application.php +++ b/trean/lib/Application.php @@ -52,8 +52,8 @@ class Trean_Application extends Horde_Registry_Application // Create db and share instances. $GLOBALS['trean_db'] = Trean::getDb(); - if (is_a($GLOBALS['trean_db'], 'PEAR_Error')) { - Horde::fatal($GLOBALS['trean_db'], __FILE__, __LINE__, false); + if ($GLOBALS['trean_db'] instanceof PEAR_Error) { + throw new Horde_Exception($GLOBALS['trean_db']); } $GLOBALS['trean_shares'] = new Trean_Bookmarks(); diff --git a/trean/lib/Bookmarks.php b/trean/lib/Bookmarks.php index 1187b1705..de33b6008 100644 --- a/trean/lib/Bookmarks.php +++ b/trean/lib/Bookmarks.php @@ -72,7 +72,7 @@ class Trean_Bookmarks { global $conf, $registry; if (empty($conf['datatree']['driver'])) { - Horde::fatal('You must configure a DataTree backend to use Trean.', __FILE__, __LINE__); + throw new Horde_Exception('You must configure a DataTree backend to use Trean.'); } $driver = $conf['datatree']['driver']; diff --git a/trean/lib/Trean.php b/trean/lib/Trean.php index 241ce8e1c..a77b4f071 100644 --- a/trean/lib/Trean.php +++ b/trean/lib/Trean.php @@ -25,8 +25,8 @@ class Trean } $folder = &$GLOBALS['trean_shares']->newFolder($GLOBALS['registry']->getAuth(), array('name' => sprintf(_("%s's Bookmarks"), $name))); $result = $GLOBALS['trean_shares']->addFolder($folder); - if (is_a($result, 'PEAR_Error')) { - Horde::fatal($result, __FILE__, __LINE__); + if ($result instanceof PEAR_Error) { + throw new Horde_Exception($result); } } } diff --git a/vilma/lib/Driver.php b/vilma/lib/Driver.php index 3a3d92109..c0b54bde4 100644 --- a/vilma/lib/Driver.php +++ b/vilma/lib/Driver.php @@ -430,6 +430,7 @@ class Vilma_Driver { * * @return Vilma_Driver The newly created concrete Vilma_Driver instance, * or false on error. + * @throws Vilma_Exception */ function factory($driver = null, $params = null) { @@ -446,9 +447,9 @@ class Vilma_Driver { $class = 'Vilma_Driver_' . $driver; if (class_exists($class)) { return new $class($params); - } else { - Horde::fatal(PEAR::raiseError(sprintf(_("No such backend \"%s\" found"), $driver)), __FILE__, __LINE__); } + + throw new Vilma_Exception(sprintf(_("No such backend \"%s\" found"), $driver)); } /** diff --git a/vilma/lib/Driver/qmailldap.php b/vilma/lib/Driver/qmailldap.php index 85ca5eba2..e92a3a347 100644 --- a/vilma/lib/Driver/qmailldap.php +++ b/vilma/lib/Driver/qmailldap.php @@ -1239,11 +1239,10 @@ class Vilma_Driver_qmailldap extends Vilma_Driver { $this->_ldap = ldap_connect($this->_ldapparams['ldaphost'], $port); if (!$this->_ldap) { - Horde::fatal("Unable to connect to LDAP server $hostname on $port", - __FILE__, __LINE__); - } - $res = ldap_set_option($this->_ldap, LDAP_OPT_PROTOCOL_VERSION, - $this->_ldapparams['version']); + throw new Vilma_Exception("Unable to connect to LDAP server $hostname on $port"); + } + $res = ldap_set_option($this->_ldap, LDAP_OPT_PROTOCOL_VERSION, + $this->_ldapparams['version']); if (!$res) { return PEAR::raiseError(_("Unable to set LDAP protocol version")); } diff --git a/whups/admin/index.php b/whups/admin/index.php index 0949ea224..9645b6d1e 100644 --- a/whups/admin/index.php +++ b/whups/admin/index.php @@ -91,8 +91,8 @@ case 'addtypestep1form': // First, add the type $tid = $whups_driver->addType($vars->get('name'), $vars->get('description')); - if (is_a($tid, 'PEAR_Error')) { - Horde::fatal($tid, __FILE__, __LINE__); + if ($tid instanceof PEAR_Error) { + throw new Horde_Exception($tid); } _open(); diff --git a/whups/data.php b/whups/data.php index 4c84a0f09..bb9c48fa4 100644 --- a/whups/data.php +++ b/whups/data.php @@ -20,10 +20,10 @@ if (!$GLOBALS['registry']->getAuth()) { $tpl = Horde_Util::getFormData('template'); if (empty($_templates[$tpl])) { - Horde::fatal(_("The requested template does not exist."), __FILE__, __LINE__); + throw new Horde_Exception(_("The requested template does not exist.")); } if ($_templates[$tpl]['type'] != 'searchresults') { - Horde::fatal(_("This is not a search results template."), __FILE__, __LINE__); + throw new Horde_Exception(_("This is not a search results template.")); } // Fetch all unresolved tickets assigned to the current user. diff --git a/whups/search/rss.php b/whups/search/rss.php index 8cd3d30ed..d0da5572a 100644 --- a/whups/search/rss.php +++ b/whups/search/rss.php @@ -20,12 +20,12 @@ $form = new SearchForm($vars); if ($form->validate($vars, true)) { $form->getInfo($vars, $info); $tickets = $whups_driver->getTicketsByProperties($info); - if (is_a($tickets, 'PEAR_Error')) { - Horde::fatal($tickets, __FILE__, __LINE__); + if ($tickets instanceof PEAR_Error) { + throw new Horde_Exception($tickets); } Whups::sortTickets($tickets, 'date_updated', 'desc'); } else { - Horde::fatal(_("Invalid search"), __FILE__, __LINE__); + throw new Horde_Exception(_("Invalid search")); } $count = 0; diff --git a/wicked/display.php b/wicked/display.php index 17a1fbb9f..c4f85e358 100644 --- a/wicked/display.php +++ b/wicked/display.php @@ -66,7 +66,7 @@ case 'export': $notification->push(_("You don't have permission to view this page."), 'horde.error'); if ($page->pageName() == 'WikiHome') { - Horde::fatal(_("You don't have permission to view this page."), __FILE__, __LINE__); + throw new Horde_Exception(_("You don't have permission to view this page.")); } Wicked::url('WikiHome', true)->redirect(); } @@ -110,7 +110,7 @@ if (!$page->allows(WICKED_MODE_DISPLAY)) { $notification->push(_("You don't have permission to view this page."), 'horde.error'); if ($page->pageName() == 'WikiHome') { - Horde::fatal(_("You don't have permission to view this page."), __FILE__, __LINE__); + throw new Horde_Exception(_("You don't have permission to view this page.")); } Wicked::url('WikiHome', true)->redirect(); } -- 2.11.0