diff options
author | Mate Bartus <mate.bartus@gmail.com> | 2015-07-23 23:35:20 +0200 |
---|---|---|
committer | Mate Bartus <mate.bartus@gmail.com> | 2015-07-23 23:35:20 +0200 |
commit | 3840882b93e96f8f510d4086d650bb9df55873ca (patch) | |
tree | 11740506b56afb1746d884767771bfcf30d2c54b /phpBB/phpbb/install/installer.php | |
parent | 115029b6012d4adf11f773a31463c8f8daf9529e (diff) | |
download | forums-3840882b93e96f8f510d4086d650bb9df55873ca.tar forums-3840882b93e96f8f510d4086d650bb9df55873ca.tar.gz forums-3840882b93e96f8f510d4086d650bb9df55873ca.tar.bz2 forums-3840882b93e96f8f510d4086d650bb9df55873ca.tar.xz forums-3840882b93e96f8f510d4086d650bb9df55873ca.zip |
[ticket/13740] Add success message when install finished
PHPBB3-13740
Diffstat (limited to 'phpBB/phpbb/install/installer.php')
-rw-r--r-- | phpBB/phpbb/install/installer.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/phpBB/phpbb/install/installer.php b/phpBB/phpbb/install/installer.php index 0e19129247..cb4ddb8783 100644 --- a/phpBB/phpbb/install/installer.php +++ b/phpBB/phpbb/install/installer.php @@ -18,6 +18,7 @@ use phpbb\install\exception\installer_config_not_writable_exception; use phpbb\install\exception\resource_limit_reached_exception; use phpbb\install\exception\user_interaction_required_exception; use phpbb\install\helper\config; +use phpbb\install\helper\iohandler\cli_iohandler; use phpbb\install\helper\iohandler\iohandler_interface; class installer @@ -171,6 +172,34 @@ class installer // Installation finished $install_finished = true; + + if ($this->iohandler instanceof cli_iohandler) + { + $this->iohandler->add_success_message('INSTALLER_FINISHED'); + } + else + { + global $SID; + + // Construct ACP url + $acp_url = $protocol = $this->install_config->get('server_protocol'); + $acp_url .= $this->install_config->get('server_name'); + $port = $this->install_config->get('server_port'); + + if (!((strpos($protocol, 'https:') === 0 && $port === 443) + || (strpos($protocol, 'http:') === 0 && $port === 80))) + { + $acp_url .= ':' . $port; + } + + $acp_url .= $this->install_config->get('script_path'); + $acp_url .= '/adm/index.php' . $SID; + + $this->iohandler->add_success_message('INSTALLER_FINISHED', array( + 'ACP_LINK', + $acp_url, + )); + } } catch (user_interaction_required_exception $e) { |