aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_install.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2014-05-02 17:57:22 +0200
committerNils Adermann <naderman@naderman.de>2014-05-02 17:57:22 +0200
commitf0be9549ac14c49cad44b1476382aedf2a6f4af8 (patch)
tree561c55b0db3d3908d57095601a4483a920b02736 /phpBB/includes/functions_install.php
parent1dd02b0a916f1cd7672ffc247f09c9b6d4598d7c (diff)
parent5496dd41ed04cf41bca15c6f9a9e9439d213100b (diff)
downloadforums-f0be9549ac14c49cad44b1476382aedf2a6f4af8.tar
forums-f0be9549ac14c49cad44b1476382aedf2a6f4af8.tar.gz
forums-f0be9549ac14c49cad44b1476382aedf2a6f4af8.tar.bz2
forums-f0be9549ac14c49cad44b1476382aedf2a6f4af8.tar.xz
forums-f0be9549ac14c49cad44b1476382aedf2a6f4af8.zip
Merge remote-tracking branch 'github-nickvergessen/feature/sqlite3' into develop-ascraeus
* github-nickvergessen/feature/sqlite3: [feature/sqlite3] Add sqlite3 database to .gitignore [feature/sqlite3] Use SQLite3 by default [feature/sqlite3] Remove invalid comment [feature/sqlite3] Remove unneeded ORDER BY type from sqlite_master queries [feature/sqlite3] Correctly recreate indexes when recreating a table [feature/sqlite3] Fix sql_index_drop() for sqlite3 [feature/sqlite3] Remove trailing comma from column list [feature/sqlite3] Update docblocks and function visibility [feature/sqlite3] Add support for SQLite 3
Diffstat (limited to 'phpBB/includes/functions_install.php')
-rw-r--r--phpBB/includes/functions_install.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index 4f8ec99d88..f484461b77 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -106,6 +106,15 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'AVAILABLE' => true,
'2.0.x' => false,
),
+ 'sqlite3' => array(
+ 'LABEL' => 'SQLite3',
+ 'SCHEMA' => 'sqlite',
+ 'MODULE' => 'sqlite3',
+ 'DELIM' => ';',
+ 'DRIVER' => 'phpbb\db\driver\sqlite3',
+ 'AVAILABLE' => true,
+ '2.0.x' => false,
+ ),
);
if ($dbms)
@@ -206,14 +215,14 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
$db->sql_return_on_error(true);
// Check that we actually have a database name before going any further.....
- if ($dbms_details['DRIVER'] != 'phpbb\db\driver\sqlite' && $dbms_details['DRIVER'] != 'phpbb\db\driver\oracle' && $dbname === '')
+ if ($dbms_details['DRIVER'] != 'phpbb\db\driver\sqlite' && $dbms_details['DRIVER'] != 'phpbb\db\driver\sqlite3' && $dbms_details['DRIVER'] != 'phpbb\db\driver\oracle' && $dbname === '')
{
$error[] = $lang['INST_ERR_DB_NO_NAME'];
return false;
}
// Make sure we don't have a daft user who thinks having the SQLite database in the forum directory is a good idea
- if ($dbms_details['DRIVER'] == 'phpbb\db\driver\sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0)
+ if (($dbms_details['DRIVER'] == 'phpbb\db\driver\sqlite' || $dbms_details['DRIVER'] == 'phpbb\db\driver\sqlite3') && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0)
{
$error[] = $lang['INST_ERR_DB_FORUM_PATH'];
return false;
@@ -243,6 +252,7 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
break;
case 'phpbb\db\driver\sqlite':
+ case 'phpbb\db\driver\sqlite3':
$prefix_length = 200;
break;
@@ -299,6 +309,14 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
}
break;
+ case 'phpbb\db\driver\sqlite3':
+ $version = \SQLite3::version();
+ if (version_compare($version['versionString'], '3.6.15', '<'))
+ {
+ $error[] = $lang['INST_ERR_DB_NO_SQLITE3'];
+ }
+ break;
+
case 'phpbb\db\driver\firebird':
// check the version of FB, use some hackery if we can't get access to the server info
if ($db->service_handle !== false && function_exists('ibase_server_info'))