From 46470845d0b473f433f688bfff183bf2caeaa7ed Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 13 Jul 2009 20:05:48 +0000 Subject: [PATCH] Horde_Exception conversions. --- lib/base.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/base.php b/lib/base.php index 4a689f7b9..17ab6b543 100644 --- a/lib/base.php +++ b/lib/base.php @@ -2,7 +2,7 @@ /** * Operator base application file. * - * $Horde: incubator/operator/lib/base.php,v 1.7 2009/07/09 06:08:45 slusarz Exp $ + * $Horde: incubator/operator/lib/base.php,v 1.8 2009/07/13 20:05:48 slusarz Exp $ * * This file brings in all of the dependencies that every Operator script will * need, and sets up objects that all scripts use. @@ -23,11 +23,13 @@ require_once HORDE_BASE . '/lib/core.php'; // Registry. $registry = Horde_Registry::singleton(); -if (is_a(($pushed = $registry->pushApp('operator', !defined('AUTH_HANDLER'))), 'PEAR_Error')) { - if ($pushed->getCode() == 'permission_denied') { +try { + $registry->pushApp('operator', !defined('AUTH_HANDLER')); +} catch (Horde_Exception $e) { + if ($e->getCode() == 'permission_denied') { Horde::authenticationFailureRedirect(); } - Horde::fatal($pushed, __FILE__, __LINE__, false); + Horde::fatal($e, __FILE__, __LINE__, false); } $conf = &$GLOBALS['conf']; @define('OPERATOR_TEMPLATES', $registry->get('templates')); -- 2.11.0