From 2efbf59f9761b869a81eaee298265290de62d6c0 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Sat, 17 Oct 2015 14:51:40 +0200 Subject: [PATCH 1/3] [ticket/13371] Fix language loading for the old installer PHPBB3-13371 --- phpBB/install/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 6320b14947..664ed231ea 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -243,6 +243,7 @@ $sub = $request->variable('sub', ''); set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); $lang_service = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)); +$lang_service->add_lang($load_lang_files); $user = new \phpbb\user($lang_service, '\phpbb\datetime'); $auth = new \phpbb\auth\auth(); From fb434adf88fa070fd938cdf4c74f2792692be6c2 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Sat, 17 Oct 2015 14:55:14 +0200 Subject: [PATCH 2/3] [ticket/13371] Use user selected language in old installer PHPBB3-13371 --- phpBB/install/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 664ed231ea..5a5afe79d9 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -244,6 +244,7 @@ set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handle $lang_service = new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)); $lang_service->add_lang($load_lang_files); +$lang_service->set_user_language($language); $user = new \phpbb\user($lang_service, '\phpbb\datetime'); $auth = new \phpbb\auth\auth(); From 22b9f35bdfd878d74536f26bc5dc249255b05480 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Sat, 17 Oct 2015 15:02:09 +0200 Subject: [PATCH 3/3] [ticket/13371] Add language files to the service as well PHPBB3-13371 --- phpBB/install/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 5a5afe79d9..a578e664cd 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -305,6 +305,11 @@ $template = new \phpbb\template\twig\twig( array($phpbb_container->get('template.twig.extensions.phpbb')) ); +/** @var \phpbb\language\language $lang_service */ +$lang_service = $phpbb_container->get('language'); +$lang_service->add_lang($load_lang_files); +$lang_service->set_user_language($language); + $paths = array($phpbb_root_path . 'install/update/new/adm/style', $phpbb_admin_path . 'style'); $paths = array_filter($paths, 'is_dir'); $template->set_custom_style(array(