From 11bcac5802dbdd01ee37b97e84f9a91c5777d9e6 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 29 Sep 2010 09:32:41 -0400
Subject: [PATCH] - Fix HTML to plain text conversion doesn't handle citation blocks (#1486921)

---
 program/include/rcube_mdb2.php |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index 84b6e2f..a2baf33 100644
--- a/program/include/rcube_mdb2.php
+++ b/program/include/rcube_mdb2.php
@@ -4,8 +4,8 @@
  +-----------------------------------------------------------------------+
  | program/include/rcube_mdb2.php                                        |
  |                                                                       |
- | This file is part of the RoundCube Webmail client                     |
- | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland                 |
+ | This file is part of the Roundcube Webmail client                     |
+ | Copyright (C) 2005-2009, Roundcube Dev. - Switzerland                 |
  | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
@@ -123,14 +123,16 @@
     {
         // Already connected
         if ($this->db_connected) {
-            // no replication, current connection is ok
-            if (empty($this->db_dsnr) || $this->db_dsnw == $this->db_dsnr)
-                return;
-
             // connected to read-write db, current connection is ok
             if ($this->db_mode == 'w')
                 return;
 
+            // no replication, current connection is ok for read and write
+            if (empty($this->db_dsnr) || $this->db_dsnw == $this->db_dsnr) {
+                $this->db_mode = 'w';
+                return;
+            }
+
             // Same mode, current connection is ok
             if ($this->db_mode == $mode)
                 return;

--
Gitblit v1.9.1