From fcbf7a12fff1a3cd8bbace46d9b61e4ce5b6a7ce Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 17 May 2011 11:35:14 -0400
Subject: [PATCH] - Fix issue which cases IMAP disconnection when encrypt() method was used (#1487900), caused by commit r4554 caused by wron patch aplication

---
 program/include/rcmail.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 8b4383e..7ef3472 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1078,6 +1078,9 @@
       if (is_object($book))
         $book->close();
 
+    if (is_object($this->imap))
+      $this->imap->close();
+
     // before closing the database connection, write session data
     if ($_SERVER['REMOTE_ADDR'])
       session_write_close();
@@ -1192,9 +1195,6 @@
         ), true, true);
       }
     }
-
-    if (is_object($this->imap))
-      $this->imap->close();
 
     return $base64 ? base64_encode($cipher) : $cipher;
   }

--
Gitblit v1.9.1