/**
* 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.
// 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'));