From 47d8d39cf49310b688967f7571b0d66b5971b39c Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sun, 21 Feb 2010 11:44:39 -0500
Subject: [PATCH] Use rcmail::imap_connect() to establish IMAP connections; always initialize rcube_imap object in mail steps

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

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index f522d0d..da21220 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -5,7 +5,7 @@
  | program/steps/mail/func.inc                                           |
  |                                                                       |
  | This file is part of the RoundCube Webmail client                     |
- | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland                 |
+ | Copyright (C) 2005-2010, RoundCube Dev. - Switzerland                 |
  | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
@@ -24,6 +24,9 @@
 // actions that do not require imap connection
 $NOIMAP_ACTIONS = array('spell', 'addcontact', 'autocomplete', 'upload', 'display-attachment', 'remove-attachment');
 
+// always instantiate imap object (but not yet connect to server)
+$RCMAIL->imap_init();
+
 // log in to imap server
 if (!in_array($RCMAIL->action, $NOIMAP_ACTIONS) && !$RCMAIL->imap_connect()) {
   $RCMAIL->kill_session();

--
Gitblit v1.9.1