From aa83e86fadb08f3c9fce63b9e811c8dcb9797352 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 25 Jul 2009 17:12:52 -0600 Subject: [PATCH] Some updates to lib/prefs.php to latest Horde 4 code. --- imp/lib/prefs.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 -- 2.11.0