Aleksander Machniak
2012-07-09 146106a827b84fa3342fb7afef5919b94c10a797
Support sqlite file mode setting
1 files modified
9 ■■■■ changed files
program/include/rcube_db_sqlite.php 9 ●●●● patch | view | raw | blame | history
program/include/rcube_db_sqlite.php
@@ -45,7 +45,12 @@
    {
        // Create database file, required by PDO to exist on connection
        if (!empty($dsn['database']) && !file_exists($dsn['database'])) {
            touch($dsn['database']);
            $created = touch($dsn['database']);
            // File mode setting, for compat. with MDB2
            if (!empty($dsn['mode']) && $created) {
                chmod($dsn['database'], octdec($dsn['mode']));
            }
        }
    }
@@ -68,7 +73,7 @@
                $q = $dbh->exec($data);
                if ($q === false) {
                    $error = $this->dbh->errorInfo();
                    $error = $dbh->errorInfo();
                    $this->db_error = true;
                    $this->db_error_msg = sprintf('[%s] %s', $error[1], $error[2]);