aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 01e8ef7658..a1c3239cbf 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -60,6 +60,7 @@ if (!empty($load_extensions) && function_exists('dl'))
}
// Include files
+require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
require($phpbb_root_path . 'includes/acm/acm_' . $acm_type . '.' . $phpEx);
require($phpbb_root_path . 'includes/cache.' . $phpEx);
require($phpbb_root_path . 'includes/template.' . $phpEx);
@@ -92,10 +93,18 @@ else
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
}
-$user = new user();
$cache = new cache();
+
+$class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx, $cache);
+$class_loader->register();
+
+$request = new phpbb_request();
+$user = new user();
$db = new $sql_db();
+// make sure request_var uses this request instance
+request_var('', 0, false, false, $request); // "dependency injection" for a function
+
// Add own hook handler, if present. :o
if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
{
@@ -1998,7 +2007,7 @@ class updater_db_tools
'VCHAR_CI' => '[varchar] (255)',
'VARBINARY' => '[varchar] (255)',
),
-
+
'mssqlnative' => array(
'INT:' => '[int]',
'BINT' => '[float]',
@@ -2028,7 +2037,7 @@ class updater_db_tools
'VCHAR_CI' => '[varchar] (255)',
'VARBINARY' => '[varchar] (255)',
),
-
+
'oracle' => array(
'INT:' => 'number(%d)',
'BINT' => 'number(20)',
@@ -2175,7 +2184,7 @@ class updater_db_tools
case 'mssql_odbc':
$this->sql_layer = 'mssql';
break;
-
+
case 'mssqlnative':
$this->sql_layer = 'mssqlnative';
break;