diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-02-17 10:52:45 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-02-17 10:52:45 +0100 |
commit | bc2c02feec27126488005624b26c6a14df7956b7 (patch) | |
tree | b813233d67ae8955af55ffc7d0d4b0e5952b3042 /program/lib/Roundcube/rcube_db.php | |
parent | f3d017cfaaf588f82da309edb1f5c11a09af6eeb (diff) |
When connection to read-only db fails try to connect to write-master, but only if it is defined
Diffstat (limited to 'program/lib/Roundcube/rcube_db.php')
-rw-r--r-- | program/lib/Roundcube/rcube_db.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php index a3475a2fd..88cd22b0e 100644 --- a/program/lib/Roundcube/rcube_db.php +++ b/program/lib/Roundcube/rcube_db.php @@ -222,7 +222,7 @@ class rcube_db $this->db_connected = is_object($this->dbh); // use write-master when read-only fails - if (!$this->db_connected && $mode == 'r') { + if (!$this->db_connected && $mode == 'r' && $this->is_replicated()) { $mode = 'w'; $this->dbh = $this->dsn_connect($this->db_dsnw_array); $this->db_connected = is_object($this->dbh); |