From: Michael M Slusarz Date: Sat, 25 Jul 2009 23:12:52 +0000 (-0600) Subject: Some updates to lib/prefs.php to latest Horde 4 code. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=aa83e86fadb08f3c9fce63b9e811c8dcb9797352;p=horde.git Some updates to lib/prefs.php to latest Horde 4 code. --- diff --git a/imp/lib/prefs.php b/imp/lib/prefs.php index 6e800c8f8..711b6e867 100644 --- a/imp/lib/prefs.php +++ b/imp/lib/prefs.php @@ -234,16 +234,16 @@ function prefs_callback() } if ($prefs->isDirty('compose_popup')) { - $GLOBALS['notification']->push('if (window.parent.frames.horde_menu) window.parent.frames.horde_menu.location.reload();', 'javascript'); + Horde::addInlineScript(array( + 'if (window.parent.frames.horde_menu) window.parent.frames.horde_menu.location.reload();' + )); } } -/* Make sure we have an active IMAP stream. */ -try { - $GLOBALS['registry']->call('mail/server'); -} catch (Horde_Exception $e) { - // TODO: Send to login screen - throw $e; +/* Make sure we are authenticated here. */ +if (!Horde_Auth::isAuthenticated('imp')) { + // TODO: Handle this more gracefully + throw new Horde_Exception(_("Not authenticated to imp")); } /* Add necessary javascript files here (so they are added to the document