aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/installer.php
diff options
context:
space:
mode:
authorMate Bartus <mate.bartus@gmail.com>2015-10-18 19:27:50 +0200
committerMate Bartus <mate.bartus@gmail.com>2015-10-18 19:27:50 +0200
commited442198d1fff379b65b8d4a1c3bfb15890cfed1 (patch)
tree554dc4dbdfab3eb27a2c7b4922db46dbf4570746 /phpBB/phpbb/install/installer.php
parent56093d1c82d6f4d5c0f2741769eb071eb7bec5d7 (diff)
downloadforums-ed442198d1fff379b65b8d4a1c3bfb15890cfed1.tar
forums-ed442198d1fff379b65b8d4a1c3bfb15890cfed1.tar.gz
forums-ed442198d1fff379b65b8d4a1c3bfb15890cfed1.tar.bz2
forums-ed442198d1fff379b65b8d4a1c3bfb15890cfed1.tar.xz
forums-ed442198d1fff379b65b8d4a1c3bfb15890cfed1.zip
[ticket/14039] Fix ACP link generation
PHPBB3-14039
Diffstat (limited to 'phpBB/phpbb/install/installer.php')
-rw-r--r--phpBB/phpbb/install/installer.php28
1 files changed, 11 insertions, 17 deletions
diff --git a/phpBB/phpbb/install/installer.php b/phpBB/phpbb/install/installer.php
index 8a0374b1f0..bdff62e0b1 100644
--- a/phpBB/phpbb/install/installer.php
+++ b/phpBB/phpbb/install/installer.php
@@ -21,6 +21,7 @@ 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;
+use phpbb\path_helper;
class installer
{
@@ -40,6 +41,11 @@ class installer
protected $iohandler;
/**
+ * @var string
+ */
+ protected $web_root;
+
+ /**
* Stores the number of steps that a given module has
*
* @var array
@@ -49,12 +55,14 @@ class installer
/**
* Constructor
*
- * @param config $config Installer config handler
+ * @param config $config Installer config handler
+ * @param path_helper $path_helper Path helper
*/
- public function __construct(config $config)
+ public function __construct(config $config, path_helper $path_helper)
{
$this->install_config = $config;
$this->installer_modules = null;
+ $this->web_root = $path_helper->get_web_root_path();
}
/**
@@ -183,21 +191,7 @@ class installer
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;
-
+ $acp_url = $this->web_root . '/adm/index.php' . $SID;
$this->iohandler->add_success_message('INSTALLER_FINISHED', array(
'ACP_LINK',
$acp_url,