From 48bc52e835bd5485f7443d54399e4fb0d36732d7 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sat, 13 Feb 2010 12:33:25 -0500
Subject: [PATCH] - Fix imap_init hook broken in r3258 (#1486493)

---
 program/steps/mail/func.inc |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 73919d3..f522d0d 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -24,9 +24,6 @@
 // actions that do not require imap connection
 $NOIMAP_ACTIONS = array('spell', 'addcontact', 'autocomplete', 'upload', 'display-attachment', 'remove-attachment');
 
-// Init IMAP object
-$RCMAIL->imap_init();
-
 // log in to imap server
 if (!in_array($RCMAIL->action, $NOIMAP_ACTIONS) && !$RCMAIL->imap_connect()) {
   $RCMAIL->kill_session();
@@ -42,7 +39,7 @@
 // set imap properties and session vars
 if ($mbox = get_input_value('_mbox', RCUBE_INPUT_GPC))
   $IMAP->set_mailbox(($_SESSION['mbox'] = $mbox));
-else
+else if ($IMAP)
   $_SESSION['mbox'] = $IMAP->get_mailbox_name();
 
 if (!empty($_GET['_page']))

--
Gitblit v1.9.1