aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2014-04-06 23:55:46 -0700
committerMatt Friedman <maf675@gmail.com>2014-04-06 23:55:46 -0700
commit41b0b8c5f92c77e406c8fc96c810749cf99b4409 (patch)
tree92c9d942888c70b5ea9373452331abc0c71d3e45 /phpBB/phpbb
parentd0aa7c6455170396fd8b6c9add7cf2a19bb17426 (diff)
downloadforums-41b0b8c5f92c77e406c8fc96c810749cf99b4409.tar
forums-41b0b8c5f92c77e406c8fc96c810749cf99b4409.tar.gz
forums-41b0b8c5f92c77e406c8fc96c810749cf99b4409.tar.bz2
forums-41b0b8c5f92c77e406c8fc96c810749cf99b4409.tar.xz
forums-41b0b8c5f92c77e406c8fc96c810749cf99b4409.zip
[ticket/12254] Better language switching on registration page
PHPBB3-12254
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/user.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index b9b3896606..fceeb53946 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -80,7 +80,21 @@ class user extends \phpbb\session
}
else
{
- $user_lang_name = basename($config['default_lang']);
+ $change_lang = request_var('change_lang', '');
+ if ($change_lang)
+ {
+ global $SID, $_EXTRA_URL;
+
+ $use_lang = basename($change_lang);
+ $user_lang_name = (file_exists($this->lang_path . $use_lang . "/common.$phpEx")) ? $use_lang : basename($config['default_lang']);
+ $this->data['user_lang'] = $user_lang_name;
+ $SID .= '&amp;change_lang=' . $user_lang_name;
+ $_EXTRA_URL[] = 'change_lang=' . $user_lang_name;
+ }
+ else
+ {
+ $user_lang_name = basename($config['default_lang']);
+ }
$user_date_format = $config['default_dateformat'];
$user_timezone = $config['board_timezone'];
@@ -189,7 +203,7 @@ class user extends \phpbb\session
$style_id = $style_request;
$SID .= '&amp;style=' . $style_id;
- $_EXTRA_URL = array('style=' . $style_id);
+ $_EXTRA_URL[] = 'style=' . $style_id;
}
else
{