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 .= '';
}