1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

- compress is nicer (fixed a bug :P)

- UTF-8 code is nicer (fixed a bug :P)
- new CAPTCHA. Replaced the old one for size and usability issues. The old CAPTCHA will most likely be released as a separate package


git-svn-id: file:///svn/phpbb/trunk@6549 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M
2006-11-03 23:09:16 +00:00
parent 7ab232a455
commit 8b0ec6e02d
12 changed files with 1423 additions and 4974 deletions

View File

@@ -54,46 +54,9 @@ class ucp_confirm
exit;
}
// Some people might want the olde style CAPTCHA even if they have GD enabled, this also saves us from people who have GD but no TTF
$policy_modules = array('policy_entropy', 'policy_3dbitmap');
if (function_exists('imagettfbbox') && function_exists('imagettftext'))
if ($config['captcha_gd'])
{
$policy_modules = array_merge($policy_modules, array('policy_overlap', 'policy_shape', 'policy_cells', 'policy_stencil', 'policy_composite'));
}
foreach ($policy_modules as $key => $name)
{
if ($config[$name] === '0')
{
unset($policy_modules[$key]);
}
}
$policy = '';
if (@extension_loaded('gd') && sizeof($policy_modules))
{
$change_lang = request_var('change_lang', '');
if ($change_lang)
{
$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)];
}
else
{
@@ -101,7 +64,7 @@ class ucp_confirm
}
$captcha = new captcha();
$captcha->execute($row['code'], $policy);
$captcha->execute($row['code']);
exit;
}
}