Skip to content

Commit

Permalink
Fix db_mode check in insert_id()
Browse files Browse the repository at this point in the history
  • Loading branch information
thomascube committed Sep 21, 2010
1 parent 1151581 commit cb2bc80
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions program/include/rcube_mdb2.php
Expand Up @@ -123,9 +123,11 @@ function db_connect($mode)
{
// 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')
Expand Down

0 comments on commit cb2bc80

Please sign in to comment.