From 1e7aa75d18e34b0733d49a3af689be0f3d73b83c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Wed, 24 Oct 2012 04:05:22 -0400 Subject: [PATCH] Remove leftover code --- program/include/rcube_db_sqlite.php | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/program/include/rcube_db_sqlite.php b/program/include/rcube_db_sqlite.php index 0b41ef5..a739767 100644 --- a/program/include/rcube_db_sqlite.php +++ b/program/include/rcube_db_sqlite.php @@ -31,6 +31,8 @@ */ class rcube_db_sqlite extends rcube_db { + public $db_provider = 'sqlite'; + /** * Database character set */ @@ -45,7 +47,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 +70,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]); -- Gitblit v1.9.1