static public function handleForm($group, $save, $app, $prefGroups,
$_prefs)
{
- global $prefs;
-
- $notification = Horde_Notification::singleton();
- $registry = Horde_Registry::singleton();
+ global $notification, $prefs, $registry;
$updated = false;
static public function generateUI($app, $prefGroups, $_prefs,
$group = null, $chunk = false)
{
- global $conf, $prefs;
-
- $browser = Horde_Browser::singleton();
- $notification = Horde_Notification::singleton();
- $registry = Horde_Registry::singleton();
+ global $browser, $conf, $notification, $prefs, $registry;
/* Check if any options are actually available. */
if (is_null($prefGroups)) {
static public function generateHeader($app, $prefGroups = null,
$group = null, $chunk = false)
{
- global $perms, $prefs;
-
- $notification = Horde_Notification::singleton();
- $registry = Horde_Registry::singleton();
+ global $notification, $perms, $prefs, $registry;
$title = _("User Options");
if ($group == 'identities' && !$prefs->isLocked('default_identity')) {
}
// Initialize global $imp_imap object.
- if (!isset($GLOBALS['imp_imap'])) {
- $GLOBALS['imp_imap'] = new IMP_Imap();
- }
+ $GLOBALS['imp_imap'] = new IMP_Imap();
// Set default message character set.
if ($def_charset = $GLOBALS['prefs']->getValue('default_msg_charset')) {
case 'delmove':
if ($prefs->isDirty('use_vtrash')) {
- $imp_search = new IMP_Search();
- $imp_search->initialize(true);
+ $GLOBALS['imp_search']->initialize(true);
}
break;
case 'server':
if ($prefs->isDirty('use_vinbox')) {
- $imp_search = new IMP_Search();
- $imp_search->initialize(true);
+ $GLOBALS['imp_search']->initialize(true);
}
if ($prefs->isDirty('subscribe')) {
*/
public function prefsStatus()
{
- $notification = Horde_Notification::singleton();
- $notification->replace('status', array('prefs' => true, 'viewmode' => 'dimp'), 'IMP_Notification_Listener_Status');
+ $GLOBALS['notification']->replace('status', array('prefs' => true, 'viewmode' => 'dimp'), 'IMP_Notification_Listener_Status');
}
/**
? 'INBOX'
: $GLOBALS['prefs']->getValue('initial_page');
- $imp_search = new IMP_Search();
-
if (!$GLOBALS['prefs']->getValue('use_vinbox') &&
- $imp_search->isVINBOXFolder($init_url)) {
+ $GLOBALS['imp_search']->isVINBOXFolder($init_url)) {
$init_url = 'folders.php';
- } elseif (($imp_search->createSearchID($init_url) == $init_url) &&
- !$imp_search->isVFolder($init_url)) {
+ } elseif (($GLOBALS['imp_search']->createSearchID($init_url) == $init_url) &&
+ !$GLOBALS['imp_search']->isVFolder($init_url)) {
$init_url = 'INBOX';
if (!$GLOBALS['prefs']->isLocked('initial_page')) {
$GLOBALS['prefs']->setValue('initial_page', $init_url);
{
/* Need to handle notifications inline, and need to set explicitly
* since the popup window is not part of the preferences framework. */
- $notification = Horde_Notification::singleton();
- $notification->replace('status', array('prefs' => true, 'viewmode' => 'imp'), 'IMP_Notification_Listener_Status');
+ $GLOBALS['notification']->replace('status', array('prefs' => true, 'viewmode' => 'imp'), 'IMP_Notification_Listener_Status');
$title = _("Import PGP Key");
require IMP_TEMPLATES . '/common-header.inc';
{
/* Need to handle notifications inline, and need to set explicitly
* since the popup window is not part of the preferences framework. */
- $notification = Horde_Notification::singleton();
- $notification->replace('status', array('prefs' => true, 'viewmode' => 'imp'), 'IMP_Notification_Listener_Status');
+ $GLOBALS['notification']->replace('status', array('prefs' => true, 'viewmode' => 'imp'), 'IMP_Notification_Listener_Status');
$title = _("Import S/MIME Key");
require IMP_TEMPLATES . '/common-header.inc';
*/
static public function status()
{
- $notification = Horde_Notification::singleton();
- $notification->notify(array('listeners' => array('status', 'audio')));
+ $GLOBALS['notification']->notify(array('listeners' => array('status', 'audio')));
}
/**
* any login alerts received should be displayed to the user at
* some point. We need to do an explicit grab of the alarms
* right now. */
- $notification = Horde_Notification::singleton();
foreach ($this->_ob->alerts() as $alert) {
- $notification->push($alert, 'horde.warning');
+ $GLOBALS['notification']->push($alert, 'horde.warning');
}
$_SESSION['imp']['imap_ob'][$_SESSION['imp']['server_key']] = serialize($this->_ob);