aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_install.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install/install_install.php')
-rw-r--r--phpBB/install/install_install.php24
1 files changed, 11 insertions, 13 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 3a6858a254..536b7142d5 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -108,7 +108,10 @@ class install_install extends module
$phpbb_container = $phpbb_container_builder->get_container();
// Sets the global variables
+ /* @var $cache \phpbb\cache\service */
$cache = $phpbb_container->get('cache');
+
+ /* @var $phpbb_log \phpbb\log\log_interface */
$phpbb_log = $phpbb_container->get('log');
$this->build_search_index($mode, $sub);
@@ -1197,7 +1200,7 @@ class install_install extends module
->get_classes();
$sqlite_db = new \phpbb\db\driver\sqlite();
- $schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $sqlite_db, new \phpbb\db\tools($sqlite_db, true), $phpbb_root_path, $phpEx, $table_prefix);
+ $schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $sqlite_db, new \phpbb\db\tools\tools($sqlite_db, true), $phpbb_root_path, $phpEx, $table_prefix);
$db_table_schema = $schema_generator->get_schema();
}
@@ -1209,7 +1212,7 @@ class install_install extends module
define('CONFIG_TABLE', $data['table_prefix'] . 'config');
}
- $db_tools = new \phpbb\db\tools($db);
+ $db_tools = new \phpbb\db\tools\tools($db);
foreach ($db_table_schema as $table_name => $table_data)
{
$db_tools->sql_create_table(
@@ -1490,8 +1493,6 @@ class install_install extends module
// We need to fill the config to let internal functions correctly work
$config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
- set_config(null, null, null, $config);
- set_config_count(null, null, null, $config);
$error = false;
$search = new \phpbb\search\fulltext_native($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
@@ -1517,6 +1518,7 @@ class install_install extends module
// modules require an extension manager
if (empty($phpbb_extension_manager))
{
+ /* @var $phpbb_extension_manager \phpbb\extension\manager */
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
}
@@ -1906,8 +1908,6 @@ class install_install extends module
// We need to fill the config to let internal functions correctly work
$config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
- set_config(null, null, null, $config);
- set_config_count(null, null, null, $config);
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
@@ -1971,7 +1971,7 @@ class install_install extends module
*/
function email_admin($mode, $sub)
{
- global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_log;
$this->page_title = $lang['STAGE_FINAL'];
@@ -1980,8 +1980,6 @@ class install_install extends module
// We need to fill the config to let internal functions correctly work
$config = new \phpbb\config\db($db, new \phpbb\cache\driver\null, CONFIG_TABLE);
- set_config(null, null, null, $config);
- set_config_count(null, null, null, $config);
$user->session_begin();
$auth->login($data['admin_name'], $data['admin_pass1'], false, true, true);
@@ -2012,7 +2010,7 @@ class install_install extends module
}
// And finally, add a note to the log
- add_log('admin', 'LOG_INSTALL_INSTALLED', $config['version']);
+ $phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_INSTALL_INSTALLED', false, array($config['version']));
$template->assign_vars(array(
'TITLE' => $lang['INSTALL_CONGRATS'],
@@ -2028,12 +2026,12 @@ class install_install extends module
*/
function disable_avatars_if_unwritable()
{
- global $phpbb_root_path;
+ global $config, $phpbb_root_path;
if (!phpbb_is_writable($phpbb_root_path . 'images/avatars/upload/'))
{
- set_config('allow_avatar', 0);
- set_config('allow_avatar_upload', 0);
+ $config->set('allow_avatar', 0);
+ $config->set('allow_avatar_upload', 0);
}
}