diff options
| author | Patrick Webster <noxwizard@phpbb.com> | 2013-11-03 21:58:05 -0600 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-02 15:45:20 +0200 |
| commit | b39b0369aa0ac6853bde0504259166f570beb983 (patch) | |
| tree | 5bc685f9ba2fc59a54cc2fb3d61440052f44dbb8 /phpBB/phpbb/search/fulltext_native.php | |
| parent | d52c2d1b5caf1382d178e55eff311ceddf4b392f (diff) | |
| download | forums-b39b0369aa0ac6853bde0504259166f570beb983.tar forums-b39b0369aa0ac6853bde0504259166f570beb983.tar.gz forums-b39b0369aa0ac6853bde0504259166f570beb983.tar.bz2 forums-b39b0369aa0ac6853bde0504259166f570beb983.tar.xz forums-b39b0369aa0ac6853bde0504259166f570beb983.zip | |
[feature/sqlite3] Add support for SQLite 3
Minimum version requirement is 3.6.15 as that's what ships with PHP 5.3.0
when support for SQLite 3 was added.
PHPBB3-9728
Diffstat (limited to 'phpBB/phpbb/search/fulltext_native.php')
| -rw-r--r-- | phpBB/phpbb/search/fulltext_native.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index 7d51d164c7..f3b229cc7c 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -768,6 +768,7 @@ class fulltext_native extends \phpbb\search\base break; case 'sqlite': + case 'sqlite3': $sql_array_count['SELECT'] = ($type == 'posts') ? 'DISTINCT p.post_id' : 'DISTINCT p.topic_id'; $sql = 'SELECT COUNT(' . (($type == 'posts') ? 'post_id' : 'topic_id') . ') as total_results FROM (' . $this->db->sql_build_query('SELECT', $sql_array_count) . ')'; @@ -997,7 +998,7 @@ class fulltext_native extends \phpbb\search\base } else { - if ($this->db->sql_layer == 'sqlite') + if ($this->db->sql_layer == 'sqlite' || $this->db->sql_layer == 'sqlite3') { $sql = 'SELECT COUNT(topic_id) as total_results FROM (SELECT DISTINCT t.topic_id'; @@ -1014,7 +1015,7 @@ class fulltext_native extends \phpbb\search\base $post_visibility $sql_fora AND t.topic_id = p.topic_id - $sql_time" . (($this->db->sql_layer == 'sqlite') ? ')' : ''); + $sql_time" . (($this->db->sql_layer == 'sqlite' || $this->db->sql_layer == 'sqlite3') ? ')' : ''); } $result = $this->db->sql_query($sql); @@ -1481,6 +1482,7 @@ class fulltext_native extends \phpbb\search\base switch ($this->db->sql_layer) { case 'sqlite': + case 'sqlite3': case 'firebird': $this->db->sql_query('DELETE FROM ' . SEARCH_WORDLIST_TABLE); $this->db->sql_query('DELETE FROM ' . SEARCH_WORDMATCH_TABLE); |
