diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/user.php | 8 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/ucp_agreement.html | 2 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/ucp_register.html | 2 |
4 files changed, 13 insertions, 10 deletions
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 3296043dd6..8660a06dcf 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -102,7 +102,6 @@ class ucp_register $s_hidden_fields = array_merge($s_hidden_fields, array( 'change_lang' => '', - 'language' => ($user_lang != $config['default_lang']) ? $user_lang : '', )); // If we change the language, we want to pass on some more possible parameter. @@ -150,6 +149,9 @@ class ucp_register 'S_SHOW_COPPA' => true, 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'), + + 'COOKIE_NAME' => $config['cookie_name'], + 'COOKIE_PATH' => $config['cookie_path'], )); } else @@ -162,6 +164,9 @@ class ucp_register 'S_REGISTRATION' => true, 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields), 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_coppa), + + 'COOKIE_NAME' => $config['cookie_name'], + 'COOKIE_PATH' => $config['cookie_path'], ) ); } @@ -410,7 +415,6 @@ class ucp_register $s_hidden_fields = array_merge($s_hidden_fields, array( 'agreed' => 'true', 'change_lang' => 0, - 'language' => ($user_lang != $config['default_lang']) ? $user_lang : '', )); if ($config['coppa_enable']) @@ -467,6 +471,9 @@ class ucp_register 'S_COPPA' => $coppa, 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'), + + 'COOKIE_NAME' => $config['cookie_name'], + 'COOKIE_PATH' => $config['cookie_path'], )); // diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index 628ddd8e59..c2dcc9db7a 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -80,16 +80,12 @@ class user extends \phpbb\session } else { - $change_lang = $request->variable('language', ''); + $change_lang = $request->variable($config['cookie_name'] . '_lang', '', true, \phpbb\request\request_interface::COOKIE); 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 .= '&language=' . $user_lang_name; - $_EXTRA_URL[] = 'language=' . $user_lang_name; } else { @@ -203,7 +199,7 @@ class user extends \phpbb\session $style_id = $style_request; $SID .= '&style=' . $style_id; - $_EXTRA_URL[] = 'style=' . $style_id; + $_EXTRA_URL = array('style=' . $style_id); } else { diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html index 458f098b32..73db520a8e 100644 --- a/phpBB/styles/prosilver/template/ucp_agreement.html +++ b/phpBB/styles/prosilver/template/ucp_agreement.html @@ -10,8 +10,8 @@ */ function change_language(lang_iso) { + document.cookie = '{COOKIE_NAME}_lang=' + lang_iso + '; path={COOKIE_PATH}'; document.forms['register'].change_lang.value = lang_iso; - document.forms['register'].language.value = lang_iso; document.forms['register'].submit(); } diff --git a/phpBB/styles/prosilver/template/ucp_register.html b/phpBB/styles/prosilver/template/ucp_register.html index 0fe550a865..b27003faab 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -7,8 +7,8 @@ */ function change_language(lang_iso) { + document.cookie = '{COOKIE_NAME}_lang=' + lang_iso + '; path={COOKIE_PATH}'; document.forms['register'].change_lang.value = lang_iso; - document.forms['register'].language.value = lang_iso; document.forms['register'].submit.click(); } // ]]> |