alecpl
2011-12-02 69f00be516afa8f085d7cc384de9551abf5a7ffe
- Fallback to write-master when readonly database fails


1 files modified
7 ■■■■■ changed files
program/include/rcube_mdb2.php 7 ●●●●● patch | view | raw | blame | history
program/include/rcube_mdb2.php
@@ -145,6 +145,13 @@
        $this->db_handle    = $this->dsn_connect($dsn);
        $this->db_connected = !PEAR::isError($this->db_handle);
        // use write-master when read-only fails
        if (!$this->db_connected && $mode == 'r') {
            $mode = 'w';
            $this->db_handle    = $this->dsn_connect($this->db_dsnw);
            $this->db_connected = !PEAR::isError($this->db_handle);
        }
        if ($this->db_connected)
            $this->db_mode = $mode;
        else