[ticket/14492] Fix redirection to help phpBB page

PHPBB3-14492
This commit is contained in:
Marc Alexander 2016-11-22 18:39:01 +01:00
parent 9b4190e136
commit 8ded30bbbe
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -59,6 +59,11 @@ class installer
*/ */
protected $web_root; protected $web_root;
/**
* @var \phpbb\user
*/
protected $user;
/** /**
* Stores the number of steps that a given module has * Stores the number of steps that a given module has
* *
@ -87,6 +92,7 @@ class installer
$this->installer_modules = null; $this->installer_modules = null;
$this->web_root = $path_helper->get_web_root_path(); $this->web_root = $path_helper->get_web_root_path();
$this->purge_cache_before = false; $this->purge_cache_before = false;
$this->user = $container->get('user');
} }
/** /**
@ -243,8 +249,14 @@ class installer
} }
else else
{ {
global $SID; // Start session and try to apply session id
$acp_url = $this->web_root . 'adm/index.php' . $SID . '&i=acp_help_phpbb&mode=help_phpbb'; $auth = $this->container_factory->get('auth');
$this->user->session_begin();
$auth->acl($this->user->data);
$this->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, $this->user->session_id);
$this->iohandler->add_success_message('INSTALLER_FINISHED', array( $this->iohandler->add_success_message('INSTALLER_FINISHED', array(
'ACP_LINK', 'ACP_LINK',
$acp_url, $acp_url,