From 8603bbba2e0bb3dfe171c0241bf97ab7ef9575fc Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sun, 26 Sep 2010 07:17:03 -0400
Subject: [PATCH] Fix base url resolution + better order for condition checks in rcube_mdb2 + updated changelog

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

diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index 06f5915..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,15 +123,15 @@
     {
         // Already connected
         if ($this->db_connected) {
+            // 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;
             }
-
-            // connected to read-write db, current connection is ok
-            if ($this->db_mode == 'w')
-                return;
 
             // Same mode, current connection is ok
             if ($this->db_mode == $mode)

--
Gitblit v1.9.1