mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +00:00
[ticket/14492] Add user service to installer & only instantiate if needed
PHPBB3-14492
This commit is contained in:
parent
8ded30bbbe
commit
5895f56de0
2 changed files with 11 additions and 10 deletions
|
@ -88,6 +88,12 @@ services:
|
||||||
calls:
|
calls:
|
||||||
- [setLexer, ['@template.twig.lexer']]
|
- [setLexer, ['@template.twig.lexer']]
|
||||||
|
|
||||||
|
user:
|
||||||
|
class: phpbb\user
|
||||||
|
arguments:
|
||||||
|
- '@language'
|
||||||
|
- '%datetime.class%'
|
||||||
|
|
||||||
console.exception_subscriber:
|
console.exception_subscriber:
|
||||||
class: phpbb\console\exception_subscriber
|
class: phpbb\console\exception_subscriber
|
||||||
arguments:
|
arguments:
|
||||||
|
|
|
@ -59,11 +59,6 @@ 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
|
||||||
*
|
*
|
||||||
|
@ -92,7 +87,6 @@ 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');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -251,12 +245,13 @@ class installer
|
||||||
{
|
{
|
||||||
// Start session and try to apply session id
|
// Start session and try to apply session id
|
||||||
$auth = $this->container_factory->get('auth');
|
$auth = $this->container_factory->get('auth');
|
||||||
$this->user->session_begin();
|
$user = $this->container_factory->get('user');
|
||||||
$auth->acl($this->user->data);
|
$user->session_begin();
|
||||||
$this->user->setup();
|
$auth->acl($user->data);
|
||||||
|
$user->setup();
|
||||||
$phpbb_root_path = $this->container_factory->get_parameter('core.root_path');
|
$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);
|
$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(
|
$this->iohandler->add_success_message('INSTALLER_FINISHED', array(
|
||||||
'ACP_LINK',
|
'ACP_LINK',
|
||||||
$acp_url,
|
$acp_url,
|
||||||
|
|
Loading…
Add table
Reference in a new issue