Paweł Słowik
2012-09-13 2cdaa79dce689b2dc9ef5c7bf3dcbd9446d86c21
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']));
            }
        }
    }
@@ -63,14 +68,12 @@
            $data = file_get_contents(INSTALL_PATH . 'SQL/sqlite.initial.sql');
            if (strlen($data)) {
                if ($this->options['debug_mode']) {
                    $this::debug('INITIALIZE DATABASE');
                }
                $this->debug('INITIALIZE DATABASE');
                $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]);