diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-21 18:47:55 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-21 18:47:55 +0000 |
| commit | 7bcd16d26df24531dcf7f2448aff7090f2ce4272 (patch) | |
| tree | 68765c706949a1db5a027852c79c380770bcdfbb /roundcubemail | |
| parent | 54d4ae9ae43c736c50af4505f23e740836e4b7da (diff) | |
Fix db_mode check in insert_id()
git-svn-id: https://svn.roundcube.net/trunk@3982 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/program/include/rcube_mdb2.php | 6 |
1 files changed, 4 insertions, 2 deletions
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') |
