summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-09-21 18:47:55 +0000
committerthomascube <thomas@roundcube.net>2010-09-21 18:47:55 +0000
commitcb2bc809ef29f349d38c89e202d821e67bb4c947 (patch)
treee1e79558447edbd18f21b5a951bdfe63f6a5e4d3 /program/include
parent115158136626d2d135cc20794b6e8dc19a8fe1bf (diff)
Fix db_mode check in insert_id()
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_mdb2.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index 84b6e2f62..06f5915e8 100644
--- a/program/include/rcube_mdb2.php
+++ b/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')