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

[ticket/14460] Use the selected language with AJAX requests as well

PHPBB3-14460
This commit is contained in:
Mate Bartus
2016-02-06 14:10:48 +01:00
parent df505d772d
commit 37705353c5
5 changed files with 13 additions and 18 deletions

View File

@@ -183,11 +183,6 @@ class helper
if (!empty($submit))
{
$lang = $this->phpbb_request->variable('language', '');
if (!empty($lang))
{
$this->language_cookie = $lang;
}
}
// Retrieve language from cookie
@@ -195,10 +190,10 @@ class helper
if (empty($lang) && !empty($lang_cookie))
{
$lang = $lang_cookie;
$this->language_cookie = $lang;
}
$lang = (!empty($lang) && strpos($lang, '/') === false) ? $lang : null;
$this->language_cookie = $lang;
$this->render_language_select($lang);

View File

@@ -123,6 +123,7 @@ class install
// Set the appropriate input-output handler
$this->installer->set_iohandler($this->iohandler_factory->get());
$this->controller_helper->handle_language_select();
if ($this->request->is_ajax())
{
@@ -142,8 +143,6 @@ class install
// Determine whether the installation was started or not
if (true)
{
$this->controller_helper->handle_language_select();
// Set active stage
$this->menu_provider->set_nav_property(
array('install', 0, 'introduction'),

View File

@@ -122,6 +122,7 @@ class update
// Set the appropriate input-output handler
$this->installer->set_iohandler($this->iohandler_factory->get());
$this->controller_helper->handle_language_select();
// Render the intro page
if ($this->request->is_ajax())
@@ -140,8 +141,6 @@ class update
}
else
{
$this->controller_helper->handle_language_select();
// Set active stage
$this->menu_provider->set_nav_property(
array('update', 0, 'introduction'),