aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_confirm.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/ucp/ucp_confirm.php')
-rw-r--r--phpBB/includes/ucp/ucp_confirm.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php
index 2c83306e5e..e40e89cbf5 100644
--- a/phpBB/includes/ucp/ucp_confirm.php
+++ b/phpBB/includes/ucp/ucp_confirm.php
@@ -77,12 +77,21 @@ class ucp_confirm
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'));
+ $change_lang = basename($change_lang);
+
+ if (file_exists($phpbb_root_path . 'language/' . $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'));
+ }
+ else
+ {
+ $change_lang = '';
+ }
}
+
include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
$policy = $policy_modules[array_rand($policy_modules)];
}