1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 00:37:42 +02:00

[ticket/14039] Revamp updater

PHPBB3-14039
This commit is contained in:
Mate Bartus
2015-07-24 09:20:50 +02:00
parent f1047ac854
commit 8f5a0ad6f7
94 changed files with 4514 additions and 263 deletions

View File

@@ -24,26 +24,28 @@ class kernel_exception_subscriber implements EventSubscriberInterface
{
/**
* Template object
*
* @var \phpbb\template\template
*/
protected $template;
/**
* User object
* @var \phpbb\user
* Language object
*
* @var \phpbb\language\language
*/
protected $user;
protected $language;
/**
* Construct method
*
* @param \phpbb\template\template $template Template object
* @param \phpbb\user $user User object
* @param \phpbb\template\template $template Template object
* @param \phpbb\language\language $language Language object
*/
public function __construct(\phpbb\template\template $template, \phpbb\user $user)
public function __construct(\phpbb\template\template $template, \phpbb\language\language $language)
{
$this->template = $template;
$this->user = $user;
$this->language = $language;
}
/**
@@ -60,15 +62,15 @@ class kernel_exception_subscriber implements EventSubscriberInterface
if ($exception instanceof \phpbb\exception\exception_interface)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($message), $exception->get_parameters()));
$message = $this->language->lang_array($message, $exception->get_parameters());
}
if (!$event->getRequest()->isXmlHttpRequest())
{
page_header($this->user->lang('INFORMATION'));
page_header($this->language->lang('INFORMATION'));
$this->template->assign_vars(array(
'MESSAGE_TITLE' => $this->user->lang('INFORMATION'),
'MESSAGE_TITLE' => $this->language->lang('INFORMATION'),
'MESSAGE_TEXT' => $message,
));