From 6dee2539419ba2c050830b7677294603a63b559a Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Sun, 9 Dec 2012 17:01:08 -0600 Subject: [ticket/11259] Make phpbb_admin_path available everywhere PHPBB3-11259 --- phpBB/install/install_install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/install/install_install.php') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 4b2fa046bc..197554d20f 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1813,7 +1813,7 @@ class install_install extends module */ function email_admin($mode, $sub) { - global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpEx; + global $auth, $config, $db, $lang, $template, $user, $phpbb_root_path, $phpbb_admin_path, $phpEx; $this->page_title = $lang['STAGE_FINAL']; @@ -1860,7 +1860,7 @@ class install_install extends module 'TITLE' => $lang['INSTALL_CONGRATS'], 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'), 'L_SUBMIT' => $lang['INSTALL_LOGIN'], - 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&mode=send_statistics'), + 'U_ACTION' => append_sid($phpbb_admin_path . 'index.' . $phpEx, 'i=send_statistics&mode=send_statistics'), )); } -- cgit v1.2.1 From b94f9ae3029777fa0aba2f3cb52b321925ce7e72 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Tue, 1 Jan 2013 20:57:21 -0500 Subject: [ticket/11305] Retrieve cache driver from container rather than cache service. This only covers some of the call sites. PHPBB3-11305 --- phpBB/install/install_install.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB/install/install_install.php') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index dfd9cd6c22..c68cc27fb6 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -52,12 +52,13 @@ class install_install extends module function main($mode, $sub) { - global $lang, $template, $language, $phpbb_root_path, $cache; + global $lang, $template, $language, $phpbb_root_path; + global $phpbb_container; switch ($sub) { case 'intro': - $cache->purge(); + $phpbb_container->get('cache.driver')->purge(); $this->page_title = $lang['SUB_INTRO']; -- cgit v1.2.1 From 8d3edd412870640f7b906f3da67de3c5303dcb7a Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Tue, 1 Jan 2013 21:07:03 -0500 Subject: [ticket/11305] Create a normal container during final installation step. The final step calls a bunch of code which expects a full phpBB runtime environment. Also, by this step everything should be configured and database schema set up. Therefore, in the final step replace installer container with a normal phpBB container. PHPBB3-11305 --- phpBB/install/install_install.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'phpBB/install/install_install.php') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index c68cc27fb6..06fc2d2176 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -52,8 +52,8 @@ class install_install extends module function main($mode, $sub) { - global $lang, $template, $language, $phpbb_root_path; - global $phpbb_container; + global $lang, $template, $language, $phpbb_root_path, $phpEx; + global $phpbb_container, $cache; switch ($sub) { @@ -102,6 +102,23 @@ class install_install extends module break; case 'final': + // Create a normal container now + $phpbb_container = phpbb_create_dumped_container_unless_debug( + array( + new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx), + new phpbb_di_extension_core($phpbb_root_path), + ), + array( + new phpbb_di_pass_collection_pass(), + new phpbb_di_pass_kernel_pass(), + ), + $phpbb_root_path, + $phpEx + ); + + // Writes into global $cache + $cache = $phpbb_container->get('cache'); + $this->build_search_index($mode, $sub); $this->add_modules($mode, $sub); $this->add_language($mode, $sub); -- cgit v1.2.1 From 210f627f6791a57aaa3555d12173bc569e76172c Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Wed, 2 Jan 2013 01:31:06 -0500 Subject: [ticket/11305] Use phpbb_create_default_container. PHPBB3-11305 --- phpBB/install/install_install.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'phpBB/install/install_install.php') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 06fc2d2176..1f3ba5da00 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -103,18 +103,7 @@ class install_install extends module case 'final': // Create a normal container now - $phpbb_container = phpbb_create_dumped_container_unless_debug( - array( - new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx), - new phpbb_di_extension_core($phpbb_root_path), - ), - array( - new phpbb_di_pass_collection_pass(), - new phpbb_di_pass_kernel_pass(), - ), - $phpbb_root_path, - $phpEx - ); + $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx); // Writes into global $cache $cache = $phpbb_container->get('cache'); -- cgit v1.2.1 From 3360d4cfce97c19a45dfcf6354b2ba9225125359 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Wed, 2 Jan 2013 01:32:22 -0500 Subject: [ticket/11305] Adjust comment. PHPBB3-11305 --- phpBB/install/install_install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/install/install_install.php') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 1f3ba5da00..1ab9caee0a 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -105,7 +105,7 @@ class install_install extends module // Create a normal container now $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx); - // Writes into global $cache + // Sets the global $cache variable $cache = $phpbb_container->get('cache'); $this->build_search_index($mode, $sub); -- cgit v1.2.1