From 7bcd16d26df24531dcf7f2448aff7090f2ce4272 Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 21 Sep 2010 18:47:55 +0000 Subject: Fix db_mode check in insert_id() git-svn-id: https://svn.roundcube.net/trunk@3982 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_mdb2.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'roundcubemail/program/include/rcube_mdb2.php') diff --git a/roundcubemail/program/include/rcube_mdb2.php b/roundcubemail/program/include/rcube_mdb2.php index 84b6e2f62..06f5915e8 100644 --- a/roundcubemail/program/include/rcube_mdb2.php +++ b/roundcubemail/program/include/rcube_mdb2.php @@ -123,9 +123,11 @@ class rcube_mdb2 { // Already connected if ($this->db_connected) { - // no replication, current connection is ok - if (empty($this->db_dsnr) || $this->db_dsnw == $this->db_dsnr) + // 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') -- cgit v1.2.3