aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-09-10 14:01:09 +0200
committerNils Adermann <naderman@naderman.de>2013-09-16 00:25:27 +0200
commitb95fdacdd378877d277e261465da73deb06e50da (patch)
tree01d55340b37f412cecd2d898c302e101b8a0ed19 /phpBB/phpbb/db
parent196e1813cd37c47965eb6f254ce6a55210a1b751 (diff)
downloadforums-b95fdacdd378877d277e261465da73deb06e50da.tar
forums-b95fdacdd378877d277e261465da73deb06e50da.tar.gz
forums-b95fdacdd378877d277e261465da73deb06e50da.tar.bz2
forums-b95fdacdd378877d277e261465da73deb06e50da.tar.xz
forums-b95fdacdd378877d277e261465da73deb06e50da.zip
[ticket/11700] Move all recent code to namespaces
PHPBB3-11700
Diffstat (limited to 'phpBB/phpbb/db')
-rw-r--r--phpBB/phpbb/db/driver/driver.php8
-rw-r--r--phpBB/phpbb/db/driver/firebird.php4
-rw-r--r--phpBB/phpbb/db/driver/mssql.php4
-rw-r--r--phpBB/phpbb/db/driver/mssql_base.php4
-rw-r--r--phpBB/phpbb/db/driver/mssql_odbc.php4
-rw-r--r--phpBB/phpbb/db/driver/mssqlnative.php6
-rw-r--r--phpBB/phpbb/db/driver/mysql.php4
-rw-r--r--phpBB/phpbb/db/driver/mysql_base.php4
-rw-r--r--phpBB/phpbb/db/driver/mysqli.php4
-rw-r--r--phpBB/phpbb/db/driver/oracle.php4
-rw-r--r--phpBB/phpbb/db/driver/postgres.php8
-rw-r--r--phpBB/phpbb/db/driver/sqlite.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_10.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_11.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_2.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_3.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_4.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php6
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_5.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_6.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php14
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php6
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_7.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_8.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_9.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php4
-rw-r--r--phpBB/phpbb/db/migration/data/30x/local_url_bbcode.php6
-rw-r--r--phpBB/phpbb/db/migration/data/310/avatars.php4
-rw-r--r--phpBB/phpbb/db/migration/data/310/boardindex.php4
-rw-r--r--phpBB/phpbb/db/migration/data/310/config_db_text.php4
-rw-r--r--phpBB/phpbb/db/migration/data/310/dev.php16
-rw-r--r--phpBB/phpbb/db/migration/data/310/extensions.php4
-rw-r--r--phpBB/phpbb/db/migration/data/310/forgot_password.php4
-rw-r--r--phpBB/phpbb/db/migration/data/310/jquery_update.php6
-rw-r--r--phpBB/phpbb/db/migration/data/310/notification_options_reconvert.php16
-rw-r--r--phpBB/phpbb/db/migration/data/310/notifications.php6
-rw-r--r--phpBB/phpbb/db/migration/data/310/notifications_schema_fix.php6
-rw-r--r--phpBB/phpbb/db/migration/data/310/reported_posts_display.php4
-rw-r--r--phpBB/phpbb/db/migration/data/310/signature_module_auth.php4
-rw-r--r--phpBB/phpbb/db/migration/data/310/softdelete_p1.php6
-rw-r--r--phpBB/phpbb/db/migration/data/310/softdelete_p2.php8
-rw-r--r--phpBB/phpbb/db/migration/data/310/style_update_p1.php6
-rw-r--r--phpBB/phpbb/db/migration/data/310/style_update_p2.php6
-rw-r--r--phpBB/phpbb/db/migration/data/310/teampage.php6
-rw-r--r--phpBB/phpbb/db/migration/data/310/timezone.php8
-rw-r--r--phpBB/phpbb/db/migration/data/310/timezone_p2.php6
-rw-r--r--phpBB/phpbb/db/migration/exception.php12
-rw-r--r--phpBB/phpbb/db/migration/migration.php18
-rw-r--r--phpBB/phpbb/db/migration/tool/config.php16
-rw-r--r--phpBB/phpbb/db/migration/tool/module.php36
-rw-r--r--phpBB/phpbb/db/migration/tool/permission.php32
-rw-r--r--phpBB/phpbb/db/migration/tool/tool_interface.php4
-rw-r--r--phpBB/phpbb/db/migrator.php40
-rw-r--r--phpBB/phpbb/db/sql_insert_buffer.php12
-rw-r--r--phpBB/phpbb/db/tools.php26
77 files changed, 348 insertions, 194 deletions
diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php
index 08c966c07a..a266b2aa48 100644
--- a/phpBB/phpbb/db/driver/driver.php
+++ b/phpBB/phpbb/db/driver/driver.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
* Database Abstraction Layer
* @package dbal
*/
-class phpbb_db_driver
+class driver
{
var $db_connect_id;
var $query_result;
@@ -272,7 +274,7 @@ class phpbb_db_driver
* Correctly adjust LIKE expression for special characters
* Some DBMS are handling them in a different way
*
- * @param string $expression The expression to use. Every wildcard is escaped, except $this->any_char and $this->one_char
+ * @param string $expression The expression to use. Every wildcard is escaped, \except $this->any_char and $this->one_char
* @return string LIKE expression including the keyword!
*/
function sql_like_expression($expression)
@@ -450,7 +452,7 @@ class phpbb_db_driver
* @param string $field name of the sql column that shall be compared
* @param array $array array of values that are allowed (IN) or not allowed (NOT IN)
* @param bool $negate true for NOT IN (), false for IN () (default)
- * @param bool $allow_empty_set If true, allow $array to be empty, this function will return 1=1 or 1=0 then. Default to false.
+ * @param bool $allow_empty_set If true, \allow $array to be empty, this function will return 1=1 or 1=0 then. Default to false.
*/
function sql_in_set($field, $array, $negate = false, $allow_empty_set = false)
{
diff --git a/phpBB/phpbb/db/driver/firebird.php b/phpBB/phpbb/db/driver/firebird.php
index 787c28b812..2df5eaf369 100644
--- a/phpBB/phpbb/db/driver/firebird.php
+++ b/phpBB/phpbb/db/driver/firebird.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
* Minimum Requirement is Firebird 2.1
* @package dbal
*/
-class phpbb_db_driver_firebird extends phpbb_db_driver
+class firebird extends \phpbb\db\driver\driver
{
var $last_query_text = '';
var $service_handle = false;
diff --git a/phpBB/phpbb/db/driver/mssql.php b/phpBB/phpbb/db/driver/mssql.php
index 89c2c2351b..4d2cd287da 100644
--- a/phpBB/phpbb/db/driver/mssql.php
+++ b/phpBB/phpbb/db/driver/mssql.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
* Minimum Requirement is MSSQL 2000+
* @package dbal
*/
-class phpbb_db_driver_mssql extends phpbb_db_driver
+class mssql extends \phpbb\db\driver\driver
{
var $connect_error = '';
diff --git a/phpBB/phpbb/db/driver/mssql_base.php b/phpBB/phpbb/db/driver/mssql_base.php
index 56c111c871..57c4e0f1fd 100644
--- a/phpBB/phpbb/db/driver/mssql_base.php
+++ b/phpBB/phpbb/db/driver/mssql_base.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
* MSSQL Database Base Abstraction Layer
* @package dbal
*/
-abstract class phpbb_db_driver_mssql_base extends phpbb_db_driver
+abstract class mssql_base extends \phpbb\db\driver\driver
{
/**
* {@inheritDoc}
diff --git a/phpBB/phpbb/db/driver/mssql_odbc.php b/phpBB/phpbb/db/driver/mssql_odbc.php
index a1d1a5d5dd..9db34a69fb 100644
--- a/phpBB/phpbb/db/driver/mssql_odbc.php
+++ b/phpBB/phpbb/db/driver/mssql_odbc.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -26,7 +28,7 @@ if (!defined('IN_PHPBB'))
*
* @package dbal
*/
-class phpbb_db_driver_mssql_odbc extends phpbb_db_driver_mssql_base
+class mssql_odbc extends \phpbb\db\driver\mssql_base
{
var $last_query_text = '';
var $connect_error = '';
diff --git a/phpBB/phpbb/db/driver/mssqlnative.php b/phpBB/phpbb/db/driver/mssqlnative.php
index 28fc88298a..e6002fe1a3 100644
--- a/phpBB/phpbb/db/driver/mssqlnative.php
+++ b/phpBB/phpbb/db/driver/mssqlnative.php
@@ -11,6 +11,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -56,7 +58,7 @@ class result_mssqlnative
{
if (is_array($value))
{
- $obj->$key = new stdClass();
+ $obj->$key = new \stdClass();
array_to_obj($value, $obj->$key);
}
else
@@ -191,7 +193,7 @@ class result_mssqlnative
/**
* @package dbal
*/
-class phpbb_db_driver_mssqlnative extends phpbb_db_driver_mssql_base
+class mssqlnative extends \phpbb\db\driver\mssql_base
{
var $m_insert_id = NULL;
var $last_query_text = '';
diff --git a/phpBB/phpbb/db/driver/mysql.php b/phpBB/phpbb/db/driver/mysql.php
index f3744ac09d..c76126763d 100644
--- a/phpBB/phpbb/db/driver/mysql.php
+++ b/phpBB/phpbb/db/driver/mysql.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -24,7 +26,7 @@ if (!defined('IN_PHPBB'))
* MySQL 5.0+
* @package dbal
*/
-class phpbb_db_driver_mysql extends phpbb_db_driver_mysql_base
+class mysql extends \phpbb\db\driver\mysql_base
{
var $multi_insert = true;
var $connect_error = '';
diff --git a/phpBB/phpbb/db/driver/mysql_base.php b/phpBB/phpbb/db/driver/mysql_base.php
index ba44ea61aa..8f2f66674b 100644
--- a/phpBB/phpbb/db/driver/mysql_base.php
+++ b/phpBB/phpbb/db/driver/mysql_base.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
* Abstract MySQL Database Base Abstraction Layer
* @package dbal
*/
-abstract class phpbb_db_driver_mysql_base extends phpbb_db_driver
+abstract class mysql_base extends \phpbb\db\driver\driver
{
/**
* {@inheritDoc}
diff --git a/phpBB/phpbb/db/driver/mysqli.php b/phpBB/phpbb/db/driver/mysqli.php
index 0f7a73ee6e..4d0e43b464 100644
--- a/phpBB/phpbb/db/driver/mysqli.php
+++ b/phpBB/phpbb/db/driver/mysqli.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -21,7 +23,7 @@ if (!defined('IN_PHPBB'))
* MySQL 4.1+ or MySQL 5.0+
* @package dbal
*/
-class phpbb_db_driver_mysqli extends phpbb_db_driver_mysql_base
+class mysqli extends \phpbb\db\driver\mysql_base
{
var $multi_insert = true;
var $connect_error = '';
diff --git a/phpBB/phpbb/db/driver/oracle.php b/phpBB/phpbb/db/driver/oracle.php
index e21e07055d..5dfab21455 100644
--- a/phpBB/phpbb/db/driver/oracle.php
+++ b/phpBB/phpbb/db/driver/oracle.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
* Oracle Database Abstraction Layer
* @package dbal
*/
-class phpbb_db_driver_oracle extends phpbb_db_driver
+class oracle extends \phpbb\db\driver\driver
{
var $last_query_text = '';
var $connect_error = '';
diff --git a/phpBB/phpbb/db/driver/postgres.php b/phpBB/phpbb/db/driver/postgres.php
index 14854d179d..7a98b90c73 100644
--- a/phpBB/phpbb/db/driver/postgres.php
+++ b/phpBB/phpbb/db/driver/postgres.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
* Minimum Requirement is Version 7.3+
* @package dbal
*/
-class phpbb_db_driver_postgres extends phpbb_db_driver
+class postgres extends \phpbb\db\driver\driver
{
var $last_query_text = '';
var $connect_error = '';
@@ -84,7 +86,7 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
$this->connect_error = 'pg_pconnect function does not exist, is pgsql extension installed?';
return $this->sql_error('');
}
- $collector = new phpbb_error_collector;
+ $collector = new \phpbb\error_collector;
$collector->install();
$this->db_connect_id = (!$new_link) ? @pg_pconnect($connect_string) : @pg_pconnect($connect_string, PGSQL_CONNECT_FORCE_NEW);
}
@@ -95,7 +97,7 @@ class phpbb_db_driver_postgres extends phpbb_db_driver
$this->connect_error = 'pg_connect function does not exist, is pgsql extension installed?';
return $this->sql_error('');
}
- $collector = new phpbb_error_collector;
+ $collector = new \phpbb\error_collector;
$collector->install();
$this->db_connect_id = (!$new_link) ? @pg_connect($connect_string) : @pg_connect($connect_string, PGSQL_CONNECT_FORCE_NEW);
}
diff --git a/phpBB/phpbb/db/driver/sqlite.php b/phpBB/phpbb/db/driver/sqlite.php
index 7188f0daa2..a548fd2618 100644
--- a/phpBB/phpbb/db/driver/sqlite.php
+++ b/phpBB/phpbb/db/driver/sqlite.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\driver;
+
/**
* @ignore
*/
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
* Minimum Requirement: 2.8.2+
* @package dbal
*/
-class phpbb_db_driver_sqlite extends phpbb_db_driver
+class sqlite extends \phpbb\db\driver\driver
{
var $connect_error = '';
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_1.php b/phpBB/phpbb/db/migration/data/30x/3_0_1.php
index c996a0138a..2fe0addc06 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10.php b/phpBB/phpbb/db/migration/data/30x/3_0_10.php
index 122f93d6b4..cdf824a9ff 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_10.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_10.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_10 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_10 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php
index 0ed05812dc..ee05fcabaa 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_10_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_10_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php
index b14b3b00aa..f53a4b0d97 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_10_rc2 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_10_rc2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php
index 473057d65d..20456e0458 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_10_rc3.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_10_rc3 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_10_rc3 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_11.php b/phpBB/phpbb/db/migration/data/30x/3_0_11.php
index e063c699cc..5b842cba4b 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_11.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_11.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_11 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_11 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php
index dddfc0e0e7..1d484a97ca 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_11_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_11_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php
index fac8523e8c..b7e475a87b 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_11_rc2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_11_rc2 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_11_rc2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php
index 6a31a51201..f1692f8ef7 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_12_rc1.php
@@ -7,9 +7,11 @@
*
*/
+namespace phpbb\db\migration\datax;
+
/** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.12-RC1 **/
-class phpbb_db_migration_data_30x_3_0_12_rc1 extends phpbb_db_migration
+class 3_0_12_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php
index 562ccf077c..0444de4ac2 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_1_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_1_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_1_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_2.php b/phpBB/phpbb/db/migration/data/30x/3_0_2.php
index eed5acef82..4f9278e2fa 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_2.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_2 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php
index a960e90765..8f709fb769 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_2_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_2_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php
index 8917dfea77..ecbe8bf808 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_2_rc2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_2_rc2 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_2_rc2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_3.php b/phpBB/phpbb/db/migration/data/30x/3_0_3.php
index 8984cf7b76..5f94bd9018 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_3.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_3.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_3 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_3 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php
index 4b102e1a2e..631d382135 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_3_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_3_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_3_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_4.php b/phpBB/phpbb/db/migration/data/30x/3_0_4.php
index 9a0c132e78..369f23f7e7 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_4.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_4.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_4 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_4 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php
index 8ad75a557b..f98d7a59d0 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_4_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_4_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -82,7 +84,7 @@ class phpbb_db_migration_data_30x_3_0_4_rc1 extends phpbb_db_migration
public function update_custom_profile_fields()
{
- // Update the Custom Profile Fields based on previous settings to the new format
+ // Update the Custom Profile Fields based on previous settings to the new \format
$sql = 'SELECT field_id, field_required, field_show_on_reg, field_hide
FROM ' . PROFILE_FIELDS_TABLE;
$result = $this->db->sql_query($sql);
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_5.php b/phpBB/phpbb/db/migration/data/30x/3_0_5.php
index 16d2dee457..9265f09b39 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_5.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_5.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_5 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_5 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php
index ea17cc1e31..b99313de5d 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_5_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_5_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php
index 8538347b1a..65787f9310 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_5_rc1part2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_5_rc1part2 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_5_rc1part2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6.php b/phpBB/phpbb/db/migration/data/30x/3_0_6.php
index bb651dc7cd..382fb6cde2 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_6.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_6.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_6 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_6 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php
index 38c282ebf0..0b54c3b195 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_6_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -214,7 +216,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration
$group_id = $this->db->sql_nextid();
}
- // Insert new user role... at the end of the chain
+ // Insert new \user role... at the end of the chain
$sql = 'SELECT role_id
FROM ' . ACL_ROLES_TABLE . "
WHERE role_name = 'ROLE_USER_NEW_MEMBER'
@@ -239,7 +241,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration
$u_role = $this->db->sql_nextid();
// Now add the correct data to the roles...
- // The standard role says that new users are not able to send a PM, Mass PM, are not able to PM groups
+ // The standard role says that new \users are not able to send a PM, Mass PM, are not able to PM groups
$sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . " (role_id, auth_option_id, auth_setting) SELECT $u_role, auth_option_id, 0 FROM " . ACL_OPTIONS_TABLE . " WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group')";
$this->sql_query($sql);
@@ -248,7 +250,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration
$this->sql_query($sql);
}
- // Insert new forum role
+ // Insert new \forum role
$sql = 'SELECT role_id
FROM ' . ACL_ROLES_TABLE . "
WHERE role_name = 'ROLE_FORUM_NEW_MEMBER'
@@ -276,7 +278,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration
$this->sql_query($sql);
}
- // Set every members user_new column to 0 (old users) only if there is no one yet (this makes sure we do not execute this more than once)
+ // Set every members user_new \column to 0 (old users) only if there is no one yet (this makes sure we do not execute this more than once)
$sql = 'SELECT 1
FROM ' . USERS_TABLE . '
WHERE user_new = 0';
@@ -318,7 +320,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc1 extends phpbb_db_migration
// Clear permissions...
include_once($this->phpbb_root_path . 'includes/acp/auth.' . $this->php_ext);
- $auth_admin = new auth_admin();
+ $auth_admin = new \auth_admin();
$auth_admin->acl_clear_prefetch();
}
}
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php
index a939dbd489..041224d19a 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_6_rc2 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_6_rc2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php
index b3f09d8ab8..3183c16efd 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc3.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_6_rc3 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_6_rc3 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -30,7 +32,7 @@ class phpbb_db_migration_data_30x_3_0_6_rc3 extends phpbb_db_migration
public function update_cp_fields()
{
- // Update the Custom Profile Fields based on previous settings to the new format
+ // Update the Custom Profile Fields based on previous settings to the new \format
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . '
SET field_show_on_vt = 1
WHERE field_hide = 0
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php
index fc2923f99b..7d75b12130 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_6_rc4.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_6_rc4 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_6_rc4 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7.php b/phpBB/phpbb/db/migration/data/30x/3_0_7.php
index 9ff2e9e4ab..1b1e5d0373 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_7.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_7.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_7 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_7 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php b/phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php
index c9cc9d19ac..a45c9c3c14 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_7_pl1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_7_pl1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_7_pl1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php
index ffebf66f2d..dab90512ab 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_7_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_7_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php
index 55bc2bc679..ea430740c6 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_7_rc2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_7_rc2 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_7_rc2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_8.php b/phpBB/phpbb/db/migration/data/30x/3_0_8.php
index 8998ef9627..c08a74e5ee 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_8.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_8.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_8 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_8 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php
index aeff35333e..dce88e249e 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_8_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_8_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_8_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9.php b/phpBB/phpbb/db/migration/data/30x/3_0_9.php
index d5269ea6f0..8254ac8561 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_9.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_9.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_9 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_9 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php
index 4c345b429b..14e0fe6013 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_9_rc1 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_9_rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php
index c0e662aa45..44fd789353 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_9_rc2 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_9_rc2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php
index d6d1f14b2e..e4102fb193 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc3.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_9_rc3 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_9_rc3 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php
index e673249343..5896d11ba5 100644
--- a/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php
+++ b/phpBB/phpbb/db/migration/data/30x/3_0_9_rc4.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_3_0_9_rc4 extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class 3_0_9_rc4 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/30x/local_url_bbcode.php b/phpBB/phpbb/db/migration/data/30x/local_url_bbcode.php
index f324b8880d..360daed437 100644
--- a/phpBB/phpbb/db/migration/data/30x/local_url_bbcode.php
+++ b/phpBB/phpbb/db/migration/data/30x/local_url_bbcode.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_30x_local_url_bbcode extends phpbb_db_migration
+namespace phpbb\db\migration\datax;
+
+class local_url_bbcode extends \phpbb\db\migration\migration
{
static public function depends_on()
{
@@ -44,7 +46,7 @@ class phpbb_db_migration_data_30x_local_url_bbcode extends phpbb_db_migration
$bbcode_match = $row['bbcode_match'];
$bbcode_tpl = $row['bbcode_tpl'];
- $acp_bbcodes = new acp_bbcodes();
+ $acp_bbcodes = new \acp_bbcodes();
$sql_ary = $acp_bbcodes->build_regexp($bbcode_match, $bbcode_tpl);
$sql = 'UPDATE ' . BBCODES_TABLE . '
diff --git a/phpBB/phpbb/db/migration/data/310/avatars.php b/phpBB/phpbb/db/migration/data/310/avatars.php
index 79547337f7..0d539d0c75 100644
--- a/phpBB/phpbb/db/migration/data/310/avatars.php
+++ b/phpBB/phpbb/db/migration/data/310/avatars.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_avatars extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class avatars extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/310/boardindex.php b/phpBB/phpbb/db/migration/data/310/boardindex.php
index 965e32c15c..ee403a7360 100644
--- a/phpBB/phpbb/db/migration/data/310/boardindex.php
+++ b/phpBB/phpbb/db/migration/data/310/boardindex.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_boardindex extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class boardindex extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/310/config_db_text.php b/phpBB/phpbb/db/migration/data/310/config_db_text.php
index 89f211adda..932edf39d7 100644
--- a/phpBB/phpbb/db/migration/data/310/config_db_text.php
+++ b/phpBB/phpbb/db/migration/data/310/config_db_text.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_config_db_text extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class config_db_text extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/310/dev.php b/phpBB/phpbb/db/migration/data/310/dev.php
index 0fc2950987..702073bcdd 100644
--- a/phpBB/phpbb/db/migration/data/310/dev.php
+++ b/phpBB/phpbb/db/migration/data/310/dev.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_dev extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class dev extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -17,10 +19,10 @@ class phpbb_db_migration_data_310_dev extends phpbb_db_migration
static public function depends_on()
{
return array(
- 'phpbb_db_migration_data_310_extensions',
- 'phpbb_db_migration_data_310_style_update_p2',
- 'phpbb_db_migration_data_310_timezone_p2',
- 'phpbb_db_migration_data_310_reported_posts_display',
+ '\phpbb\db\migration\data0\extensions',
+ '\phpbb\db\migration\data0\style_update_p2',
+ '\phpbb\db\migration\data0\timezone_p2',
+ '\phpbb\db\migration\data0\reported_posts_display',
);
}
@@ -183,7 +185,7 @@ class phpbb_db_migration_data_310_dev extends phpbb_db_migration
public function move_customise_modules()
{
- // Move language management to new location in the Customise tab
+ // Move language management to new \location in the Customise tab
// First get language module id
$sql = 'SELECT module_id FROM ' . MODULES_TABLE . "
WHERE module_basename = 'acp_language'";
@@ -206,7 +208,7 @@ class phpbb_db_migration_data_310_dev extends phpbb_db_migration
{
include($this->phpbb_root_path . 'includes/functions_acp.' . $this->php_ext);
}
- $module_manager = new acp_modules();
+ $module_manager = new \acp_modules();
$module_manager->module_class = 'acp';
$module_manager->move_module($language_module_id, $language_management_module_id);
}
diff --git a/phpBB/phpbb/db/migration/data/310/extensions.php b/phpBB/phpbb/db/migration/data/310/extensions.php
index 6a9caa1cfc..fde2038cca 100644
--- a/phpBB/phpbb/db/migration/data/310/extensions.php
+++ b/phpBB/phpbb/db/migration/data/310/extensions.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_extensions extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class extensions extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/310/forgot_password.php b/phpBB/phpbb/db/migration/data/310/forgot_password.php
index a553e51f35..9a42565223 100644
--- a/phpBB/phpbb/db/migration/data/310/forgot_password.php
+++ b/phpBB/phpbb/db/migration/data/310/forgot_password.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_forgot_password extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class forgot_password extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/310/jquery_update.php b/phpBB/phpbb/db/migration/data/310/jquery_update.php
index dc49f74fcb..2b30e2dd3b 100644
--- a/phpBB/phpbb/db/migration/data/310/jquery_update.php
+++ b/phpBB/phpbb/db/migration/data/310/jquery_update.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_jquery_update extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class jquery_update extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -17,7 +19,7 @@ class phpbb_db_migration_data_310_jquery_update extends phpbb_db_migration
static public function depends_on()
{
return array(
- 'phpbb_db_migration_data_310_dev',
+ '\phpbb\db\migration\data0\dev',
);
}
diff --git a/phpBB/phpbb/db/migration/data/310/notification_options_reconvert.php b/phpBB/phpbb/db/migration/data/310/notification_options_reconvert.php
index d994d7ec5f..482051c287 100644
--- a/phpBB/phpbb/db/migration/data/310/notification_options_reconvert.php
+++ b/phpBB/phpbb/db/migration/data/310/notification_options_reconvert.php
@@ -7,11 +7,13 @@
*
*/
-class phpbb_db_migration_data_310_notification_options_reconvert extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class notification_options_reconvert extends \phpbb\db\migration\migration
{
static public function depends_on()
{
- return array('phpbb_db_migration_data_310_notifications_schema_fix');
+ return array('\phpbb\db\migration\data0\notifications_schema_fix');
}
public function update_data()
@@ -24,7 +26,7 @@ class phpbb_db_migration_data_310_notification_options_reconvert extends phpbb_d
public function convert_notifications()
{
$insert_table = $this->table_prefix . 'user_notifications';
- $insert_buffer = new phpbb_db_sql_insert_buffer($this->db, $insert_table);
+ $insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, $insert_table);
$this->perform_conversion($insert_buffer, $insert_table);
}
@@ -32,10 +34,10 @@ class phpbb_db_migration_data_310_notification_options_reconvert extends phpbb_d
/**
* Perform the conversion (separate for testability)
*
- * @param phpbb_db_sql_insert_buffer $insert_buffer
+ * @param \phpbb\db\sql_insert_buffer $insert_buffer
* @param string $insert_table
*/
- public function perform_conversion(phpbb_db_sql_insert_buffer $insert_buffer, $insert_table)
+ public function perform_conversion(\phpbb\db\sql_insert_buffer $insert_buffer, $insert_table)
{
$sql = 'DELETE FROM ' . $insert_table;
$this->db->sql_query($sql);
@@ -94,13 +96,13 @@ class phpbb_db_migration_data_310_notification_options_reconvert extends phpbb_d
/**
* Insert method rows to DB
*
- * @param phpbb_db_sql_insert_buffer $insert_buffer
+ * @param \phpbb\db\sql_insert_buffer $insert_buffer
* @param string $item_type
* @param int $item_id
* @param int $user_id
* @param string $methods
*/
- protected function add_method_rows(phpbb_db_sql_insert_buffer $insert_buffer, $item_type, $item_id, $user_id, array $methods)
+ protected function add_method_rows(\phpbb\db\sql_insert_buffer $insert_buffer, $item_type, $item_id, $user_id, array $methods)
{
$row_base = array(
'item_type' => $item_type,
diff --git a/phpBB/phpbb/db/migration/data/310/notifications.php b/phpBB/phpbb/db/migration/data/310/notifications.php
index 17c939d95a..f5bd9ebf07 100644
--- a/phpBB/phpbb/db/migration/data/310/notifications.php
+++ b/phpBB/phpbb/db/migration/data/310/notifications.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_notifications extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class notifications extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_310_notifications extends phpbb_db_migration
static public function depends_on()
{
- return array('phpbb_db_migration_data_310_dev');
+ return array('\phpbb\db\migration\data0\dev');
}
public function update_schema()
diff --git a/phpBB/phpbb/db/migration/data/310/notifications_schema_fix.php b/phpBB/phpbb/db/migration/data/310/notifications_schema_fix.php
index 27e63e10d0..fa2da6fe92 100644
--- a/phpBB/phpbb/db/migration/data/310/notifications_schema_fix.php
+++ b/phpBB/phpbb/db/migration/data/310/notifications_schema_fix.php
@@ -7,11 +7,13 @@
*
*/
-class phpbb_db_migration_data_310_notifications_schema_fix extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class notifications_schema_fix extends \phpbb\db\migration\migration
{
static public function depends_on()
{
- return array('phpbb_db_migration_data_310_notifications');
+ return array('\phpbb\db\migration\data0\notifications');
}
public function update_schema()
diff --git a/phpBB/phpbb/db/migration/data/310/reported_posts_display.php b/phpBB/phpbb/db/migration/data/310/reported_posts_display.php
index 80a0a0e43f..ef35f48970 100644
--- a/phpBB/phpbb/db/migration/data/310/reported_posts_display.php
+++ b/phpBB/phpbb/db/migration/data/310/reported_posts_display.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_reported_posts_display extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class reported_posts_display extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/310/signature_module_auth.php b/phpBB/phpbb/db/migration/data/310/signature_module_auth.php
index e4fbb27bcb..27585fec10 100644
--- a/phpBB/phpbb/db/migration/data/310/signature_module_auth.php
+++ b/phpBB/phpbb/db/migration/data/310/signature_module_auth.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_signature_module_auth extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class signature_module_auth extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
diff --git a/phpBB/phpbb/db/migration/data/310/softdelete_p1.php b/phpBB/phpbb/db/migration/data/310/softdelete_p1.php
index 84f8eebd4a..22ee78bb22 100644
--- a/phpBB/phpbb/db/migration/data/310/softdelete_p1.php
+++ b/phpBB/phpbb/db/migration/data/310/softdelete_p1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_softdelete_p1 extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class softdelete_p1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_310_softdelete_p1 extends phpbb_db_migration
static public function depends_on()
{
- return array('phpbb_db_migration_data_310_dev');
+ return array('\phpbb\db\migration\data0\dev');
}
public function update_schema()
diff --git a/phpBB/phpbb/db/migration/data/310/softdelete_p2.php b/phpBB/phpbb/db/migration/data/310/softdelete_p2.php
index 7320a2c2bf..698e44fab7 100644
--- a/phpBB/phpbb/db/migration/data/310/softdelete_p2.php
+++ b/phpBB/phpbb/db/migration/data/310/softdelete_p2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_softdelete_p2 extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class softdelete_p2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -17,8 +19,8 @@ class phpbb_db_migration_data_310_softdelete_p2 extends phpbb_db_migration
static public function depends_on()
{
return array(
- 'phpbb_db_migration_data_310_dev',
- 'phpbb_db_migration_data_310_softdelete_p1',
+ '\phpbb\db\migration\data0\dev',
+ '\phpbb\db\migration\data0\softdelete_p1',
);
}
diff --git a/phpBB/phpbb/db/migration/data/310/style_update_p1.php b/phpBB/phpbb/db/migration/data/310/style_update_p1.php
index d43537559d..fe60993f20 100644
--- a/phpBB/phpbb/db/migration/data/310/style_update_p1.php
+++ b/phpBB/phpbb/db/migration/data/310/style_update_p1.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_style_update_p1 extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class style_update_p1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -59,7 +61,7 @@ class phpbb_db_migration_data_310_style_update_p1 extends phpbb_db_migration
// Get list of valid 3.1 styles
$available_styles = array('prosilver');
- $iterator = new DirectoryIterator($this->phpbb_root_path . 'styles');
+ $iterator = new \DirectoryIterator($this->phpbb_root_path . 'styles');
$skip_dirs = array('.', '..', 'prosilver');
foreach ($iterator as $fileinfo)
{
diff --git a/phpBB/phpbb/db/migration/data/310/style_update_p2.php b/phpBB/phpbb/db/migration/data/310/style_update_p2.php
index 7b10518a66..3f6477b7cb 100644
--- a/phpBB/phpbb/db/migration/data/310/style_update_p2.php
+++ b/phpBB/phpbb/db/migration/data/310/style_update_p2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_style_update_p2 extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class style_update_p2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_310_style_update_p2 extends phpbb_db_migration
static public function depends_on()
{
- return array('phpbb_db_migration_data_310_style_update_p1');
+ return array('\phpbb\db\migration\data0\style_update_p1');
}
public function update_schema()
diff --git a/phpBB/phpbb/db/migration/data/310/teampage.php b/phpBB/phpbb/db/migration/data/310/teampage.php
index 4e77da17b7..605156dc41 100644
--- a/phpBB/phpbb/db/migration/data/310/teampage.php
+++ b/phpBB/phpbb/db/migration/data/310/teampage.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_teampage extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class teampage extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_310_teampage extends phpbb_db_migration
static public function depends_on()
{
- return array('phpbb_db_migration_data_310_dev');
+ return array('\phpbb\db\migration\data0\dev');
}
public function update_schema()
diff --git a/phpBB/phpbb/db/migration/data/310/timezone.php b/phpBB/phpbb/db/migration/data/310/timezone.php
index 6e50cbe45f..97fea19a64 100644
--- a/phpBB/phpbb/db/migration/data/310/timezone.php
+++ b/phpBB/phpbb/db/migration/data/310/timezone.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_timezone extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class timezone extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -63,12 +65,12 @@ class phpbb_db_migration_data_310_timezone extends phpbb_db_migration
}
/**
- * Determine the new timezone for a given phpBB 3.0 timezone and
+ * Determine the new \timezone for a given phpBB 3.0 timezone and
* "Daylight Saving Time" option
*
* @param $timezone float Users timezone in 3.0
* @param $dst int Users daylight saving time
- * @return string Users new php Timezone which is used since 3.1
+ * @return string Users new \php Timezone which is used since 3.1
*/
public function convert_phpbb30_timezone($timezone, $dst)
{
diff --git a/phpBB/phpbb/db/migration/data/310/timezone_p2.php b/phpBB/phpbb/db/migration/data/310/timezone_p2.php
index 113b979e4f..0c174b0d56 100644
--- a/phpBB/phpbb/db/migration/data/310/timezone_p2.php
+++ b/phpBB/phpbb/db/migration/data/310/timezone_p2.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_db_migration_data_310_timezone_p2 extends phpbb_db_migration
+namespace phpbb\db\migration\data0;
+
+class timezone_p2 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
@@ -16,7 +18,7 @@ class phpbb_db_migration_data_310_timezone_p2 extends phpbb_db_migration
static public function depends_on()
{
- return array('phpbb_db_migration_data_310_timezone');
+ return array('\phpbb\db\migration\data0\timezone');
}
public function update_schema()
diff --git a/phpBB/phpbb/db/migration/exception.php b/phpBB/phpbb/db/migration/exception.php
index e84330dd71..8bf18dec68 100644
--- a/phpBB/phpbb/db/migration/exception.php
+++ b/phpBB/phpbb/db/migration/exception.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\migration;
+
/**
* @ignore
*/
@@ -16,11 +18,11 @@ if (!defined('IN_PHPBB'))
}
/**
-* The migrator is responsible for applying new migrations in the correct order.
+* The migrator is responsible for applying new \migrations in the correct order.
*
* @package db
*/
-class phpbb_db_migration_exception extends \Exception
+class exception extends \Exception
{
/**
* Extra parameters sent to exception to aid in debugging
@@ -64,12 +66,12 @@ class phpbb_db_migration_exception extends \Exception
}
/**
- * Get localised message (with $user->lang())
+ * Get localised message (\with $user->lang())
*
- * @param phpbb_user $user
+ * @param \phpbb\user $user
* @return string
*/
- public function getLocalisedMessage(phpbb_user $user)
+ public function getLocalisedMessage(\phpbb\user $user)
{
$parameters = $this->getParameters();
array_unshift($parameters, $this->getMessage());
diff --git a/phpBB/phpbb/db/migration/migration.php b/phpBB/phpbb/db/migration/migration.php
index 0ffa96fd14..aff3837279 100644
--- a/phpBB/phpbb/db/migration/migration.php
+++ b/phpBB/phpbb/db/migration/migration.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db\migration;
+
/**
* @ignore
*/
@@ -24,15 +26,15 @@ if (!defined('IN_PHPBB'))
*
* @package db
*/
-abstract class phpbb_db_migration
+abstract class migration
{
- /** @var phpbb_config */
+ /** @var \phpbb\config\config */
protected $config;
- /** @var phpbb_db_driver */
+ /** @var \phpbb\db\driver\driver */
protected $db;
- /** @var phpbb_db_tools */
+ /** @var \phpbb\db\tools */
protected $db_tools;
/** @var string */
@@ -53,14 +55,14 @@ abstract class phpbb_db_migration
/**
* Constructor
*
- * @param phpbb_config $config
- * @param phpbb_db_driver $db
- * @param phpbb_db_tools $db_tools
+ * @param \phpbb\config\config $config
+ * @param \phpbb\db\driver\driver $db
+ * @param \phpbb\db\tools $db_tools
* @param string $phpbb_root_path
* @param string $php_ext
* @param string $table_prefix
*/
- public function __construct(phpbb_config $config, phpbb_db_driver $db, phpbb_db_tools $db_tools, $phpbb_root_path, $php_ext, $table_prefix)
+ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\db\tools $db_tools, $phpbb_root_path, $php_ext, $table_prefix)
{
$this->config = $config;
$this->db = $db;
diff --git a/phpBB/phpbb/db/migration/tool/config.php b/phpBB/phpbb/db/migration/tool/config.php
index 5dd47cfa60..6ff69bbd2b 100644
--- a/phpBB/phpbb/db/migration/tool/config.php
+++ b/phpBB/phpbb/db/migration/tool/config.php
@@ -7,22 +7,24 @@
*
*/
+namespace phpbb\db\migration\tool;
+
/**
* Migration config tool
*
* @package db
*/
-class phpbb_db_migration_tool_config implements phpbb_db_migration_tool_tool_interface
+class config implements \phpbb\db\migration\tool\tool_interface
{
- /** @var phpbb_config */
+ /** @var \phpbb\config\config */
protected $config;
/**
* Constructor
*
- * @param phpbb_config $config
+ * @param \phpbb\config\config $config
*/
- public function __construct(phpbb_config $config)
+ public function __construct(\phpbb\config\config $config)
{
$this->config = $config;
}
@@ -67,7 +69,7 @@ class phpbb_db_migration_tool_config implements phpbb_db_migration_tool_tool_int
{
if (!isset($this->config[$config_name]))
{
- throw new phpbb_db_migration_exception('CONFIG_NOT_EXIST', $config_name);
+ throw new \phpbb\db\migration\exception('CONFIG_NOT_EXIST', $config_name);
}
$this->config->set($config_name, $config_value);
@@ -78,7 +80,7 @@ class phpbb_db_migration_tool_config implements phpbb_db_migration_tool_tool_int
* current config value
*
* @param string $compare If equal to the current config value, will be
- * updated to the new config value, otherwise not
+ * updated to the new \config value, otherwise not
* @param string $config_name The name of the config setting you would
* like to update
* @param mixed $config_value The value of the config setting
@@ -88,7 +90,7 @@ class phpbb_db_migration_tool_config implements phpbb_db_migration_tool_tool_int
{
if (!isset($this->config[$config_name]))
{
- throw new phpbb_db_migration_exception('CONFIG_NOT_EXIST', $config_name);
+ throw new \phpbb\db\migration\exception('CONFIG_NOT_EXIST', $config_name);
}
$this->config->set_atomic($config_name, $compare, $config_value);
diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php
index 8ed2a933ff..ecb1176bd4 100644
--- a/phpBB/phpbb/db/migration/tool/module.php
+++ b/phpBB/phpbb/db/migration/tool/module.php
@@ -7,20 +7,22 @@
*
*/
+namespace phpbb\db\migration\tool;
+
/**
* Migration module management tool
*
* @package db
*/
-class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_interface
+class module implements \phpbb\db\migration\tool\tool_interface
{
- /** @var phpbb_cache_service */
+ /** @var \phpbb\cache\service */
protected $cache;
/** @var dbal */
protected $db;
- /** @var phpbb_user */
+ /** @var \phpbb\user */
protected $user;
/** @var string */
@@ -35,14 +37,14 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_int
/**
* Constructor
*
- * @param phpbb_db_driver $db
+ * @param \phpbb\db\driver\driver $db
* @param mixed $cache
- * @param phpbb_user $user
+ * @param \phpbb\user $user
* @param string $phpbb_root_path
* @param string $php_ext
* @param string $modules_table
*/
- public function __construct(phpbb_db_driver $db, phpbb_cache_service $cache, phpbb_user $user, $phpbb_root_path, $php_ext, $modules_table)
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\service $cache, \phpbb\user $user, $phpbb_root_path, $php_ext, $modules_table)
{
$this->db = $db;
$this->cache = $cache;
@@ -129,11 +131,11 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_int
/**
* Module Add
*
- * Add a new module
+ * Add a new \module
*
* @param string $class The module class(acp|mcp|ucp)
* @param int|string $parent The parent module_id|module_langname (0 for no parent)
- * @param array $data an array of the data on the new module.
+ * @param array $data an array of the data on the new \module.
* This can be setup in two different ways.
* 1. The "manual" way. For inserting a category or one at a time.
* It will be merged with the base array shown a bit below,
@@ -221,14 +223,14 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_int
if (!$module_id)
{
- throw new phpbb_db_migration_exception('MODULE_NOT_EXIST', $parent);
+ throw new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $parent);
}
$parent = $data['parent_id'] = $module_id;
}
else if (!$this->exists($class, false, $parent))
{
- throw new phpbb_db_migration_exception('MODULE_NOT_EXIST', $parent);
+ throw new \phpbb\db\migration\exception('MODULE_NOT_EXIST', $parent);
}
if ($this->exists($class, $parent, $data['module_langname']))
@@ -241,7 +243,7 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_int
include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
$this->user->add_lang('acp/modules');
}
- $acp_modules = new acp_modules();
+ $acp_modules = new \acp_modules();
$module_data = array(
'module_enabled' => (isset($data['module_enabled'])) ? $data['module_enabled'] : 1,
@@ -259,7 +261,7 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_int
if (is_string($result))
{
// Error
- throw new phpbb_db_migration_exception('MODULE_ERROR', $result);
+ throw new \phpbb\db\migration\exception('MODULE_ERROR', $result);
}
else
{
@@ -347,7 +349,7 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_int
// Failed.
if (!isset($module['module_basename']))
{
- throw new phpbb_db_migration_exception('MODULE_NOT_EXIST');
+ throw new \phpbb\db\migration\exception('MODULE_NOT_EXIST');
}
// Automatic method
@@ -433,7 +435,7 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_int
include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
$this->user->add_lang('acp/modules');
}
- $acp_modules = new acp_modules();
+ $acp_modules = new \acp_modules();
$acp_modules->module_class = $class;
foreach ($module_ids as $module_id)
@@ -476,7 +478,7 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_int
}
/**
- * Wrapper for acp_modules::get_module_infos()
+ * Wrapper for \acp_modules::get_module_infos()
*
* @param string $class Module Class
* @param string $basename Module Basename
@@ -488,12 +490,12 @@ class phpbb_db_migration_tool_module implements phpbb_db_migration_tool_tool_int
{
include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
}
- $acp_modules = new acp_modules();
+ $acp_modules = new \acp_modules();
$module = $acp_modules->get_module_infos($basename, $class, true);
if (empty($module))
{
- throw new phpbb_db_migration_exception('MODULE_INFO_FILE_NOT_EXIST', $class, $basename);
+ throw new \phpbb\db\migration\exception('MODULE_INFO_FILE_NOT_EXIST', $class, $basename);
}
return array_pop($module);
diff --git a/phpBB/phpbb/db/migration/tool/permission.php b/phpBB/phpbb/db/migration/tool/permission.php
index f1140d0759..51b0996c30 100644
--- a/phpBB/phpbb/db/migration/tool/permission.php
+++ b/phpBB/phpbb/db/migration/tool/permission.php
@@ -7,17 +7,19 @@
*
*/
+namespace phpbb\db\migration\tool;
+
/**
* Migration permission management tool
*
* @package db
*/
-class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool_interface
+class permission implements \phpbb\db\migration\tool\tool_interface
{
- /** @var phpbb_auth */
+ /** @var \phpbb\auth\auth */
protected $auth;
- /** @var phpbb_cache_service */
+ /** @var \phpbb\cache\service */
protected $cache;
/** @var dbal */
@@ -32,13 +34,13 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool
/**
* Constructor
*
- * @param phpbb_db_driver $db
+ * @param \phpbb\db\driver\driver $db
* @param mixed $cache
- * @param phpbb_auth $auth
+ * @param \phpbb\auth\auth $auth
* @param string $phpbb_root_path
* @param string $php_ext
*/
- public function __construct(phpbb_db_driver $db, phpbb_cache_service $cache, phpbb_auth $auth, $phpbb_root_path, $php_ext)
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\service $cache, \phpbb\auth\auth $auth, $phpbb_root_path, $php_ext)
{
$this->db = $db;
$this->cache = $cache;
@@ -117,7 +119,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool
{
include($this->phpbb_root_path . 'includes/acp/auth.' . $this->php_ext);
}
- $auth_admin = new auth_admin();
+ $auth_admin = new \auth_admin();
// We have to add a check to see if the !$global (if global, local, and if local, global) permission already exists. If it does, acl_add_option currently has a bug which would break the ACL system, so we are having a work-around here.
if ($this->exists($auth_option, !$global))
@@ -236,9 +238,9 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool
}
/**
- * Add a new permission role
+ * Add a new \permission role
*
- * @param string $role_name The new role name
+ * @param string $role_name The new \role name
* @param sting $role_type The type (u_, m_, a_)
* @return null
*/
@@ -277,7 +279,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool
* Update the name on a permission role
*
* @param string $old_role_name The old role name
- * @param string $new_role_name The new role name
+ * @param string $new_role_name The new \role name
* @return null
*/
public function role_update($old_role_name, $new_role_name)
@@ -290,7 +292,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool
if (!$role_id)
{
- throw new phpbb_db_migration_exception('ROLE_NOT_EXIST', $old_role_name);
+ throw new \phpbb\db\migration\exception('ROLE_NOT_EXIST', $old_role_name);
}
$sql = 'UPDATE ' . ACL_ROLES_TABLE . "
@@ -380,7 +382,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool
if (!$role_id)
{
- throw new phpbb_db_migration_exception('ROLE_NOT_EXIST', $name);
+ throw new \phpbb\db\migration\exception('ROLE_NOT_EXIST', $name);
}
$sql = 'SELECT auth_option_id, auth_setting
@@ -403,7 +405,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool
if (!$group_id)
{
- throw new phpbb_db_migration_exception('GROUP_NOT_EXIST', $name);
+ throw new \phpbb\db\migration\exception('GROUP_NOT_EXIST', $name);
}
// If the group has a role set for them we will add the requested permissions to that role.
@@ -523,7 +525,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool
if (!$role_id)
{
- throw new phpbb_db_migration_exception('ROLE_NOT_EXIST', $name);
+ throw new \phpbb\db\migration\exception('ROLE_NOT_EXIST', $name);
}
$sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . '
@@ -540,7 +542,7 @@ class phpbb_db_migration_tool_permission implements phpbb_db_migration_tool_tool
if (!$group_id)
{
- throw new phpbb_db_migration_exception('GROUP_NOT_EXIST', $name);
+ throw new \phpbb\db\migration\exception('GROUP_NOT_EXIST', $name);
}
// If the group has a role set for them we will remove the requested permissions from that role.
diff --git a/phpBB/phpbb/db/migration/tool/tool_interface.php b/phpBB/phpbb/db/migration/tool/tool_interface.php
index 72344d50d2..e7b89d8858 100644
--- a/phpBB/phpbb/db/migration/tool/tool_interface.php
+++ b/phpBB/phpbb/db/migration/tool/tool_interface.php
@@ -7,12 +7,14 @@
*
*/
+namespace phpbb\db\migration\tool;
+
/**
* Migration tool interface
*
* @package db
*/
-interface phpbb_db_migration_tool_tool_interface
+interface tool_interface
{
/**
* Retrieve a short name used for commands in migrations.
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index ca3ffc8043..0b9463a622 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db;
+
/**
* @ignore
*/
@@ -16,19 +18,19 @@ if (!defined('IN_PHPBB'))
}
/**
-* The migrator is responsible for applying new migrations in the correct order.
+* The migrator is responsible for applying new \migrations in the correct order.
*
* @package db
*/
-class phpbb_db_migrator
+class migrator
{
- /** @var phpbb_config */
+ /** @var \phpbb\config\config */
protected $config;
- /** @var phpbb_db_driver */
+ /** @var \phpbb\db\driver\driver */
protected $db;
- /** @var phpbb_db_tools */
+ /** @var \phpbb\db\tools */
protected $db_tools;
/** @var string */
@@ -71,7 +73,7 @@ class phpbb_db_migrator
/**
* Constructor of the database migrator
*/
- public function __construct(phpbb_config $config, phpbb_db_driver $db, phpbb_db_tools $db_tools, $migrations_table, $phpbb_root_path, $php_ext, $table_prefix, $tools)
+ public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\db\tools $db_tools, $migrations_table, $phpbb_root_path, $php_ext, $table_prefix, $tools)
{
$this->config = $config;
$this->db = $db;
@@ -240,7 +242,7 @@ class phpbb_db_migrator
$state['migration_data_done'] = ($result === true);
$state['migration_end_time'] = ($result === true) ? time() : 0;
}
- catch (phpbb_db_migration_exception $e)
+ catch (\phpbb\db\migration\exception $e)
{
// Revert the schema changes
$this->revert($name);
@@ -398,7 +400,7 @@ class phpbb_db_migrator
));
}
}
- catch (phpbb_db_migration_exception $e)
+ catch (\phpbb\db\migration\exception $e)
{
// We should try rolling back here
foreach ($steps as $reverse_step_identifier => $reverse_step)
@@ -474,12 +476,12 @@ class phpbb_db_migrator
case 'if':
if (!isset($parameters[0]))
{
- throw new phpbb_db_migration_exception('MIGRATION_INVALID_DATA_MISSING_CONDITION', $step);
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_MISSING_CONDITION', $step);
}
if (!isset($parameters[1]))
{
- throw new phpbb_db_migration_exception('MIGRATION_INVALID_DATA_MISSING_STEP', $step);
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_MISSING_STEP', $step);
}
$condition = $parameters[0];
@@ -496,7 +498,7 @@ class phpbb_db_migrator
case 'custom':
if (!is_callable($parameters[0]))
{
- throw new phpbb_db_migration_exception('MIGRATION_INVALID_DATA_CUSTOM_NOT_CALLABLE', $step);
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_CUSTOM_NOT_CALLABLE', $step);
}
return array(
@@ -508,17 +510,17 @@ class phpbb_db_migrator
default:
if (!$method)
{
- throw new phpbb_db_migration_exception('MIGRATION_INVALID_DATA_UNKNOWN_TYPE', $step);
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_UNKNOWN_TYPE', $step);
}
if (!isset($this->tools[$class]))
{
- throw new phpbb_db_migration_exception('MIGRATION_INVALID_DATA_UNDEFINED_TOOL', $step);
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_UNDEFINED_TOOL', $step);
}
if (!method_exists(get_class($this->tools[$class]), $method))
{
- throw new phpbb_db_migration_exception('MIGRATION_INVALID_DATA_UNDEFINED_METHOD', $step);
+ throw new \phpbb\db\migration\exception('MIGRATION_INVALID_DATA_UNDEFINED_METHOD', $step);
}
// Attempt to reverse operations
@@ -656,7 +658,7 @@ class phpbb_db_migrator
* Helper to get a migration
*
* @param string $name Name of the migration
- * @return phpbb_db_migration
+ * @return \phpbb\db\migration\migration
*/
protected function get_migration($name)
{
@@ -694,7 +696,7 @@ class phpbb_db_migrator
/**
* Load migration data files from a directory
*
- * @param phpbb_extension_finder $finder
+ * @param \phpbb\extension\finder $finder
* @param string $path Path to migration data files
* @param bool $check_fulfillable If TRUE (default), we will check
* if all of the migrations are fulfillable after loading them.
@@ -703,11 +705,11 @@ class phpbb_db_migrator
* with the last call to prevent throwing errors unnecessarily).
* @return array Array of migration names
*/
- public function load_migrations(phpbb_extension_finder $finder, $path, $check_fulfillable = true)
+ public function load_migrations(\phpbb\extension\finder $finder, $path, $check_fulfillable = true)
{
if (!is_dir($path))
{
- throw new phpbb_db_migration_exception('DIRECTORY INVALID', $path);
+ throw new \phpbb\db\migration\exception('DIRECTORY INVALID', $path);
}
$migrations = array();
@@ -736,7 +738,7 @@ class phpbb_db_migrator
$unfulfillable = $this->unfulfillable($name);
if ($unfulfillable !== false)
{
- throw new phpbb_db_migration_exception('MIGRATION_NOT_FULFILLABLE', $name, $unfulfillable);
+ throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $unfulfillable);
}
}
}
diff --git a/phpBB/phpbb/db/sql_insert_buffer.php b/phpBB/phpbb/db/sql_insert_buffer.php
index c18f908429..7bbd213bdc 100644
--- a/phpBB/phpbb/db/sql_insert_buffer.php
+++ b/phpBB/phpbb/db/sql_insert_buffer.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db;
+
/**
* @ignore
*/
@@ -38,7 +40,7 @@ if (!defined('IN_PHPBB'))
*
* Usage:
* <code>
-* $buffer = new phpbb_db_sql_insert_buffer($db, 'test_table', 1234);
+* $buffer = new \phpbb\db\sql_insert_buffer($db, 'test_table', 1234);
*
* while (do_stuff())
* {
@@ -53,9 +55,9 @@ if (!defined('IN_PHPBB'))
*
* @package dbal
*/
-class phpbb_db_sql_insert_buffer
+class sql_insert_buffer
{
- /** @var phpbb_db_driver */
+ /** @var \phpbb\db\driver\driver */
protected $db;
/** @var string */
@@ -68,11 +70,11 @@ class phpbb_db_sql_insert_buffer
protected $buffer = array();
/**
- * @param phpbb_db_driver $db
+ * @param \phpbb\db\driver\driver $db
* @param string $table_name
* @param int $max_buffered_rows
*/
- public function __construct(phpbb_db_driver $db, $table_name, $max_buffered_rows = 500)
+ public function __construct(\phpbb\db\driver\driver $db, $table_name, $max_buffered_rows = 500)
{
$this->db = $db;
$this->table_name = $table_name;
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index 492284ffcd..35b89e8166 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\db;
+
/**
* @ignore
*/
@@ -21,7 +23,7 @@ if (!defined('IN_PHPBB'))
*
* @package dbal
*/
-class phpbb_db_tools
+class tools
{
/**
* Current sql layer
@@ -300,10 +302,10 @@ class phpbb_db_tools
/**
* Constructor. Set DB Object and set {@link $return_statements return_statements}.
*
- * @param phpbb_db_driver $db Database connection
+ * @param \phpbb\db\driver\driver $db Database connection
* @param bool $return_statements True if only statements should be returned and no SQL being executed
*/
- public function __construct(phpbb_db_driver $db, $return_statements = false)
+ public function __construct(\phpbb\db\driver\driver $db, $return_statements = false)
{
$this->db = $db;
$this->return_statements = $return_statements;
@@ -491,7 +493,7 @@ class phpbb_db_tools
trigger_error("Index name '${column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
}
- // here we add the definition of the new column to the list of columns
+ // here we add the definition of the new \column to the list of columns
switch ($this->sql_layer)
{
case 'mssql':
@@ -978,7 +980,7 @@ class phpbb_db_tools
$column_list[] = $entities[0];
}
- // note down the primary key notation because sqlite only supports adding it to the end for the new table
+ // note down the primary key notation because sqlite only supports adding it to the end for the new \table
$primary_key = false;
$_new_cols = array();
@@ -1058,7 +1060,7 @@ class phpbb_db_tools
{
$new_table_cols[] = 'PRIMARY KEY (' . implode(', ', $sql_schema_changes['primary_key']) . ')';
}
- // Add a new one or the old primary key
+ // Add a new \one or the old primary key
else if ($primary_key !== false)
{
$new_table_cols[] = $primary_key;
@@ -1066,7 +1068,7 @@ class phpbb_db_tools
$columns = implode(',', $column_list);
- // create a new table and fill it up. destroy the temp one
+ // create a new \table and fill it up. destroy the temp one
$statements[] = 'CREATE TABLE ' . $table_name . ' (' . implode(',', $new_table_cols) . ');';
$statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
$statements[] = 'DROP TABLE ' . $table_name . '_temp';
@@ -1689,7 +1691,7 @@ class phpbb_db_tools
}
/**
- * Add new column
+ * Add new \column
*/
function sql_column_add($table_name, $column_name, $column_data, $inline = false)
{
@@ -1798,7 +1800,7 @@ class phpbb_db_tools
$new_table_cols = $column_name . ' ' . $column_data['column_type_sql'] . ',' . $new_table_cols;
- // create a new table and fill it up. destroy the temp one
+ // create a new \table and fill it up. destroy the temp one
$statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ');';
$statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
$statements[] = 'DROP TABLE ' . $table_name . '_temp';
@@ -1913,7 +1915,7 @@ class phpbb_db_tools
$new_table_cols = preg_replace('/' . $column_name . '[^,]+(?:,|$)/m', '', $new_table_cols);
- // create a new table and fill it up. destroy the temp one
+ // create a new \table and fill it up. destroy the temp one
$statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ');';
$statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
$statements[] = 'DROP TABLE ' . $table_name . '_temp';
@@ -2105,7 +2107,7 @@ class phpbb_db_tools
$columns = implode(',', $column_list);
- // create a new table and fill it up. destroy the temp one
+ // create a new \table and fill it up. destroy the temp one
$statements[] = 'CREATE TABLE ' . $table_name . ' (' . $new_table_cols . ', PRIMARY KEY (' . implode(', ', $column) . '));';
$statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
$statements[] = 'DROP TABLE ' . $table_name . '_temp';
@@ -2471,7 +2473,7 @@ class phpbb_db_tools
$columns = implode(',', $column_list);
- // create a new table and fill it up. destroy the temp one
+ // create a new \table and fill it up. destroy the temp one
$statements[] = 'CREATE TABLE ' . $table_name . ' (' . implode(',', $old_table_cols) . ');';
$statements[] = 'INSERT INTO ' . $table_name . ' (' . $columns . ') SELECT ' . $columns . ' FROM ' . $table_name . '_temp;';
$statements[] = 'DROP TABLE ' . $table_name . '_temp';