}
// Fetch the (possibly updated) list of extensions
-$devices = $shout->devices->getDevices($context);
+try {
+ $devices = $shout->devices->getDevices($context);
+} catch (Exception $e) {
+ $notification->push($e);
+ $devices = array();
+}
Horde::addScriptFile('stripe.js', 'horde');
require SHOUT_TEMPLATES . '/common-header.inc';
$title .= _("List Users");
}
+
// Fetch the (possibly updated) list of extensions
-$extensions = $shout->extensions->getExtensions($context);
+try {
+ $extensions = $shout->extensions->getExtensions($context);
+} catch (Exception $e) {
+ $notification->push($e);
+ $extensions = array();
+}
Horde::addScriptFile('stripe.js', 'horde');
Horde::addScriptFile('prototype.js', 'horde');
$GLOBALS['registry'] = &Horde_Registry::singleton();
$registry = &$GLOBALS['registry'];
try {
- $registry->pushApp('shout', array('check_perms' => true,
- 'logintasks' => true));
+ $registry->pushApp('shout');
} catch (Horde_Exception $e) {
Horde_Auth::authenticateFailure('shout', $e);
}
+ $conf = &$GLOBALS['conf'];
+
+ // Notification system.
+ $GLOBALS['notification'] = &Horde_Notification::singleton();
+ $notification = &$GLOBALS['notification'];
+ $notification->attach('status');
define('SHOUT_TEMPLATES', $registry->get('templates'));
$contexts = false;
}
- $notification = &Horde_Notification::singleton();
- $GLOBALS['notification'] = $notification;
- $notification->attach('status');
-
if (count($contexts) == 1) {
// Default to the user's only context
if (!empty($context) && $context != $contexts[0]) {
Horde::logMessage($msg, __FILE__, __LINE__, PEAR_LOG_DEBUG);
$result = $this->_db->query($sql, $vars);
if ($result instanceof PEAR_Error) {
- throw Shout_Exception($result);
+ throw new Shout_Exception($result);
}
$row = $result->fetchRow(DB_FETCHMODE_ASSOC);
if ($row instanceof PEAR_Error) {
- throw Shout_Exception($row);
+ throw new Shout_Exception($row);
}
$contexts = array();
<?php
-class Shout_Exception extends Horde_Exception
-{
-}
\ No newline at end of file
+class Shout_Exception extends Horde_Exception {}