From 5541765c4adefbd78d78476be104fb54846e6270 Mon Sep 17 00:00:00 2001 From: David M Date: Sun, 6 Aug 2006 18:06:00 +0000 Subject: [PATCH] - Bug git-svn-id: file:///svn/phpbb/trunk@6243 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/ucp/ucp_confirm.php | 10 ++++++++++ phpBB/includes/ucp/ucp_register.php | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php index 618ec6b96d..2c83306e5e 100644 --- a/phpBB/includes/ucp/ucp_confirm.php +++ b/phpBB/includes/ucp/ucp_confirm.php @@ -73,6 +73,16 @@ class ucp_confirm $policy = ''; if (@extension_loaded('gd') && sizeof($policy_modules)) { + $change_lang = request_var('change_lang', ''); + + if ($change_lang) + { + $lang = $change_lang; + $user->lang_name = $lang = $change_lang; + $user->lang_path = $phpbb_root_path . 'language/' . $lang . '/'; + $user->lang = array(); + $user->add_lang(array('common', 'ucp')); + } include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx); $policy = $policy_modules[array_rand($policy_modules)]; } diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 727979d439..620b388f99 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -363,6 +363,7 @@ class ucp_register // Visual Confirmation - Show images if ($config['enable_confirm']) { + $str = ''; if (!$change_lang) { $sql = 'SELECT session_id @@ -409,8 +410,12 @@ class ucp_register ); $db->sql_query($sql); } + else + { + $str .= '&change_lang=' . $change_lang; + } - $confirm_image = ''; + $confirm_image = ''; $s_hidden_fields .= ''; }