From bfd169e7acf419aab4528bac99e3ecbc0e55d312 Mon Sep 17 00:00:00 2001 From: David M Date: Thu, 16 Mar 2006 00:09:43 +0000 Subject: - SQLite is now usable; we died on certain queries as well as a schema issue (I took the liberty of applying some RegEx-Fu to the parser :D) git-svn-id: file:///svn/phpbb/trunk@5638 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/sqlite.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/db/sqlite.php') diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php index 4c8edeb4d5..17a8adb411 100644 --- a/phpBB/includes/db/sqlite.php +++ b/phpBB/includes/db/sqlite.php @@ -28,13 +28,14 @@ class dbal_sqlite extends dbal */ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false) { + global $phpbb_root_path; $this->persistency = $persistency; $this->user = $sqluser; $this->server = $sqlserver . (($port) ? ':' . $port : ''); $this->dbname = $database; $error = ''; - $this->db_connect_id = ($this->persistency) ? @sqlite_popen($this->server, 0666, $error) : @sqlite_open($this->server, 0666, $error); + $this->db_connect_id = ($this->persistency) ? @sqlite_popen($this->server, 0666, $error) : @sqlite_open($phpbb_root_path .'install/'. $this->server, 0777, $error); if ($this->db_connect_id) { @@ -87,7 +88,7 @@ class dbal_sqlite extends dbal { global $cache; - $query = preg_replace('#FROM \((.*?)\)(,|[\n\r\t ]+?WHERE) #s', 'FROM \1\2 ', $query); + $query = preg_replace('#FROM \(([^)]*)\)(,|[\n\r\t ]+(?:WHERE|LEFT JOIN)) #', 'FROM \1\2 ', $query); // EXPLAIN only in extra debug mode if (defined('DEBUG_EXTRA')) -- cgit v1.2.1