aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_confirm.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-10-30 16:20:11 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-10-30 16:20:11 +0000
commitc44f6ca080c944b57dc912de8708e5239c1543a2 (patch)
tree812e6cdb05ee83c0270f8d72d2e064adcb75064a /phpBB/includes/ucp/ucp_confirm.php
parent7e55e53d10702a9d8af8a70685801aa486fab3dc (diff)
downloadforums-c44f6ca080c944b57dc912de8708e5239c1543a2.tar
forums-c44f6ca080c944b57dc912de8708e5239c1543a2.tar.gz
forums-c44f6ca080c944b57dc912de8708e5239c1543a2.tar.bz2
forums-c44f6ca080c944b57dc912de8708e5239c1543a2.tar.xz
forums-c44f6ca080c944b57dc912de8708e5239c1543a2.zip
some fixes
git-svn-id: file:///svn/phpbb/trunk@6538 89ea8834-ac86-4346-8a33-228a782c2dd0
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)];
}