From 78325736b1560c17713b5207c53fe0af582fab0b Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 2 May 2014 12:08:35 -0700 Subject: [ticket/12254] Use a cookie instead of SID to store language selection PHPBB3-12254 --- phpBB/includes/ucp/ucp_register.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/ucp') 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'], )); // -- cgit v1.2.1