mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
- 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
This commit is contained in:
parent
7afd25bbd8
commit
bfd169e7ac
2 changed files with 3 additions and 4 deletions
|
@ -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'))
|
||||
|
|
|
@ -838,8 +838,6 @@ CREATE TABLE phpbb_topics_marking (
|
|||
PRIMARY KEY (user_id, topic_id)
|
||||
);
|
||||
|
||||
CREATE INDEX forum_id_phpbb_topics_posted on phpbb_topics_posted (forum_id);
|
||||
|
||||
# Table: phpbb_topics_posted
|
||||
CREATE TABLE phpbb_topics_posted (
|
||||
user_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
|
|
Loading…
Add table
Reference in a new issue