Skip to content

Commit

Permalink
[ticket/14739] Remove SQLite 2.8.x database driver
Browse files Browse the repository at this point in the history
PHPBB3-14739
  • Loading branch information
senky committed Nov 16, 2016
1 parent 9c7e8c2 commit e974f33
Show file tree
Hide file tree
Showing 28 changed files with 11 additions and 730 deletions.
8 changes: 0 additions & 8 deletions phpBB/config/default/container/services_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,3 @@ services:
- '%core.root_path%'
- '@request'
- '@dbal.conn.driver'

dbal.extractor.extractors.sqlite_extractor:
class: phpbb\db\extractor\sqlite_extractor
shared: false
arguments:
- '%core.root_path%'
- '@request'
- '@dbal.conn.driver'
1 change: 0 additions & 1 deletion phpBB/develop/add_permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
$sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary));
break;

case 'sqlite':
case 'sqlite3':
$sql = implode(' UNION ALL ', preg_replace('#^(.*?)$#', 'SELECT \1', $sql_subary));
break;
Expand Down
2 changes: 1 addition & 1 deletion phpBB/develop/create_schema_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
->directory('/db/migration/data')
->get_classes();

$db = new \phpbb\db\driver\sqlite();
$db = new \phpbb\db\driver\sqlite3();
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($db, true);

Expand Down
1 change: 0 additions & 1 deletion phpBB/docs/INSTALL.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ <h1>Install</h1>
<li>MySQL 3.23 or above (MySQLi supported)</li>
<li>MariaDB 5.1 or above</li>
<li>PostgreSQL 8.3+</li>
<li>SQLite 2.8.2+</li>
<li>SQLite 3.6.15+</li>
<li>MS SQL Server 2000 or above (via ODBC or the native adapter)</li>
<li>Oracle</li>
Expand Down
2 changes: 1 addition & 1 deletion phpBB/docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ <h1>Readme</h1>

<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>

<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8, SQLite 2 and SQLite 3. Versions of PHP used range from 5.4.x above 5.6.x to 7.0.x without problem.</p>
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 5.4.x above 5.6.x to 7.0.x without problem.</p>

<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>

Expand Down
2 changes: 0 additions & 2 deletions phpBB/includes/acp/acp_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ function main($id, $mode)
// We might wanna empty out all that junk :D
switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
$extractor->flush('DELETE FROM ' . $table_name . ";\n");
break;
Expand Down Expand Up @@ -304,7 +303,6 @@ function main($id, $mode)
case 'mysql':
case 'mysql4':
case 'mysqli':
case 'sqlite':
case 'sqlite3':
while (($sql = $fgetd($fp, ";\n", $read, $seek, $eof)) !== false)
{
Expand Down
1 change: 0 additions & 1 deletion phpBB/includes/acp/acp_icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ function main($id, $mode)
{
switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
$db->sql_query('DELETE FROM ' . $table);
break;
Expand Down
2 changes: 0 additions & 2 deletions phpBB/includes/acp/acp_main.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ function main($id, $mode)
case 'db_track':
switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
$db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
break;
Expand Down Expand Up @@ -386,7 +385,6 @@ function main($id, $mode)
{
switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
$db->sql_query("DELETE FROM $table");
break;
Expand Down
1 change: 0 additions & 1 deletion phpBB/includes/acp/acp_reasons.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ function main($id, $mode)
// Teh standard
case 'postgres':
case 'oracle':
case 'sqlite':
case 'sqlite3':
// Change the reports using this reason to 'other'
$sql = 'UPDATE ' . REPORTS_TABLE . '
Expand Down
2 changes: 1 addition & 1 deletion phpBB/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3522,7 +3522,7 @@ function obtain_guest_count($item_id = 0, $item = 'forum')

// Get number of online guests

if ($db->get_sql_layer() === 'sqlite' || $db->get_sql_layer() === 'sqlite3')
if ($db->get_sql_layer() === 'sqlite3')
{
$sql = 'SELECT COUNT(session_ip) as num_guests
FROM (
Expand Down
2 changes: 0 additions & 2 deletions phpBB/includes/functions_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2403,7 +2403,6 @@ function phpbb_cache_moderators($db, $cache, $auth)
// Clear table
switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
$db->sql_query('DELETE FROM ' . MODERATOR_CACHE_TABLE);
break;
Expand Down Expand Up @@ -2861,7 +2860,6 @@ function get_database_size()
}
break;

case 'sqlite':
case 'sqlite3':
global $dbhost;

Expand Down
2 changes: 0 additions & 2 deletions phpBB/includes/functions_convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,6 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
$sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary));
break;

case 'sqlite':
case 'sqlite3':
case 'mssqlnative':
$sql = implode(' UNION ALL ', preg_replace('#^(.*?)$#', 'SELECT \1', $sql_subary));
Expand Down Expand Up @@ -2040,7 +2039,6 @@ function update_topics_posted()

switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
$db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
break;
Expand Down
1 change: 0 additions & 1 deletion phpBB/install/convert/controller/convertor.php
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ public function finish()

switch ($this->db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
$this->db->sql_query('DELETE FROM ' . $this->session_keys_table);
$this->db->sql_query('DELETE FROM ' . $this->session_table);
Expand Down
2 changes: 0 additions & 2 deletions phpBB/install/convert/convertor.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ function convert_data($converter)
$convert->mysql_convert = false;
switch ($src_db->sql_layer)
{
case 'sqlite':
case 'sqlite3':
$convert->src_truncate_statement = 'DELETE FROM ';
break;
Expand Down Expand Up @@ -176,7 +175,6 @@ function convert_data($converter)

switch ($db->get_sql_layer())
{
case 'sqlite':
case 'sqlite3':
$convert->truncate_statement = 'DELETE FROM ';
break;
Expand Down
1 change: 0 additions & 1 deletion phpBB/install/convertors/functions_phpbb20.php
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,6 @@ function phpbb_create_userconv_table()
)';
break;

case 'sqlite':
case 'sqlite3':
$create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
user_id INTEGER NOT NULL DEFAULT \'0\',
Expand Down
3 changes: 0 additions & 3 deletions phpBB/language/en/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
<ul>
<li>MySQL 3.23 or above (MySQLi supported)</li>
<li>PostgreSQL 8.3+</li>
<li>SQLite 2.8.2+</li>
<li>SQLite 3.6.15+</li>
<li>MS SQL Server 2000 or above (directly or via ODBC)</li>
<li>MS SQL Server 2005 or above (native)</li>
Expand Down Expand Up @@ -191,7 +190,6 @@
'DB_OPTION_MYSQLI' => 'MySQL with MySQLi Extension',
'DB_OPTION_ORACLE' => 'Oracle',
'DB_OPTION_POSTGRES' => 'PostgreSQL',
'DB_OPTION_SQLITE' => 'SQLite 2',
'DB_OPTION_SQLITE3' => 'SQLite 3',

// Errors
Expand All @@ -204,7 +202,6 @@
'INST_ERR_DB_NO_ERROR' => 'No error message given.',
'INST_ERR_PREFIX' => 'Tables with the specified prefix already exist, please choose an alternative.',
'INST_ERR_DB_NO_MYSQLI' => 'The version of MySQL installed on this machine is incompatible with the “MySQL with MySQLi Extension” option you have selected. Please try the “MySQL” option instead.',
'INST_ERR_DB_NO_SQLITE' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 2.8.2.',
'INST_ERR_DB_NO_SQLITE3' => 'The version of the SQLite extension you have installed is too old, it must be upgraded to at least 3.6.15.',
'INST_ERR_DB_NO_ORACLE' => 'The version of Oracle installed on this machine requires you to set the <var>NLS_CHARACTERSET</var> parameter to <var>UTF8</var>. Either upgrade your installation to 9.2+ or change the parameter.',
'INST_ERR_DB_NO_POSTGRES' => 'The database you have selected was not created in <var>UNICODE</var> or <var>UTF8</var> encoding. Try installing with a database in <var>UNICODE</var> or <var>UTF8</var> encoding.',
Expand Down
Loading

0 comments on commit e974f33

Please sign in to comment.