diff options
Diffstat (limited to 'phpBB/phpbb/install/installer.php')
-rw-r--r-- | phpBB/phpbb/install/installer.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/phpBB/phpbb/install/installer.php b/phpBB/phpbb/install/installer.php index 240423ae78..e04e233a76 100644 --- a/phpBB/phpbb/install/installer.php +++ b/phpBB/phpbb/install/installer.php @@ -243,8 +243,21 @@ class installer } else { - global $SID; - $acp_url = $this->web_root . 'adm/index.php' . $SID; + // Start session if not installing and get user object + // to allow redirecting to ACP + $user = $this->container_factory->get('user'); + if (!isset($module) || !($module instanceof \phpbb\install\module\install_finish\module)) + { + $auth = $this->container_factory->get('auth'); + + $user->session_begin(); + $auth->acl($user->data); + $user->setup(); + } + + $phpbb_root_path = $this->container_factory->get_parameter('core.root_path'); + + $acp_url = append_sid($phpbb_root_path . 'adm/index.php', 'i=acp_help_phpbb&mode=help_phpbb', true, $user->session_id); $this->iohandler->add_success_message('INSTALLER_FINISHED', array( 'ACP_LINK', $acp_url, |