diff options
author | Matt Friedman <maf675@gmail.com> | 2014-04-07 09:14:58 -0700 |
---|---|---|
committer | Matt Friedman <maf675@gmail.com> | 2014-04-07 09:14:58 -0700 |
commit | daae87d65a20664af09a002f90483cc75e84d01f (patch) | |
tree | e5b65105f6f7fe69910885fde2a84a7bb0b2ebc7 | |
parent | a5940ede5bc8a7594b84fd4b489ada2110ecbdcc (diff) | |
download | forums-daae87d65a20664af09a002f90483cc75e84d01f.tar forums-daae87d65a20664af09a002f90483cc75e84d01f.tar.gz forums-daae87d65a20664af09a002f90483cc75e84d01f.tar.bz2 forums-daae87d65a20664af09a002f90483cc75e84d01f.tar.xz forums-daae87d65a20664af09a002f90483cc75e84d01f.zip |
[ticket/12254] Use new set_lang var to avoid conflict with change_lang
PHPBB3-12254
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/user.php | 6 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/ucp_agreement.html | 1 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/ucp_register.html | 1 |
4 files changed, 8 insertions, 6 deletions
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index f866e8ec26..fe4eeec1ef 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -64,9 +64,7 @@ class ucp_register $agreed = false; } - $user->lang_name = $user_lang = $use_lang; - $user->data['user_lang'] = $user->lang_name; - $user->add_lang(array('common', 'ucp')); + $user_lang = $use_lang; } else { @@ -105,6 +103,7 @@ class ucp_register $s_hidden_fields = array_merge($s_hidden_fields, array( 'change_lang' => '', + 'set_lang' => $user_lang, )); // If we change the language, we want to pass on some more possible parameter. @@ -412,6 +411,7 @@ class ucp_register $s_hidden_fields = array_merge($s_hidden_fields, array( 'agreed' => 'true', 'change_lang' => 0, + 'set_lang' => $user_lang, )); if ($config['coppa_enable']) diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index d9ff75b997..36f72a69b9 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -80,7 +80,7 @@ class user extends \phpbb\session } else { - $change_lang = $request->variable('change_lang', ''); + $change_lang = $request->variable('set_lang', ''); if ($change_lang) { global $SID, $_EXTRA_URL; @@ -88,8 +88,8 @@ class user extends \phpbb\session $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 .= '&change_lang=' . $user_lang_name; - $_EXTRA_URL[] = 'change_lang=' . $user_lang_name; + $SID .= '&set_lang=' . $user_lang_name; + $_EXTRA_URL[] = 'set_lang=' . $user_lang_name; } else { diff --git a/phpBB/styles/prosilver/template/ucp_agreement.html b/phpBB/styles/prosilver/template/ucp_agreement.html index 6c96be864a..5fabd40f9d 100644 --- a/phpBB/styles/prosilver/template/ucp_agreement.html +++ b/phpBB/styles/prosilver/template/ucp_agreement.html @@ -11,6 +11,7 @@ function change_language(lang_iso) { document.forms['register'].change_lang.value = lang_iso; + document.forms['register'].set_lang.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 fc469eff36..22314babff 100644 --- a/phpBB/styles/prosilver/template/ucp_register.html +++ b/phpBB/styles/prosilver/template/ucp_register.html @@ -8,6 +8,7 @@ function change_language(lang_iso) { document.forms['register'].change_lang.value = lang_iso; + document.forms['register'].set_lang.value = lang_iso; document.forms['register'].submit.click(); } // ]]> |