1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-21 00:02:18 +02:00

Make some changes to how the visual confirmation is handled if zlib is unavailable

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5713 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Graham Eames 2006-03-25 14:22:45 +00:00
parent a24592f9f4
commit c01f77be2a
2 changed files with 10 additions and 13 deletions

View File

@ -155,7 +155,9 @@ else
{
$_png = define_raw_pngs();
$char = substr($code, -1);
$c = intval($HTTP_GET_VARS['c']);
$char = substr($code, $c - 1, 1);
header('Content-Type: image/png');
header('Cache-control: no-cache, no-store');
echo base64_decode($_png[$char]);

View File

@ -132,7 +132,8 @@ if (
}
}
$signature = str_replace('<br />', "\n", $signature);
$signature = (isset($signature)) ? str_replace('<br />', "\n", $signature) : '';
$signature_bbcode_uid = '';
// Run some validation on the optional fields. These are pass-by-ref, so they'll be changed to
// empty strings if they fail.
@ -296,12 +297,6 @@ if ( isset($HTTP_POST_VARS['submit']) )
if ($row = $db->sql_fetchrow($result))
{
// Only compare one char if the zlib-extension is not loaded
if (!@extension_loaded('zlib'))
{
$row['code'] = substr($row['code'], -1);
}
if ($row['code'] != $confirm_code)
{
$error = TRUE;
@ -1022,11 +1017,11 @@ else
$form_enctype = ( @$ini_val('file_uploads') == '0' || strtolower(@$ini_val('file_uploads') == 'off') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';
$template->assign_vars(array(
'USERNAME' => $username,
'CUR_PASSWORD' => $cur_password,
'NEW_PASSWORD' => $new_password,
'PASSWORD_CONFIRM' => $password_confirm,
'EMAIL' => $email,
'USERNAME' => isset($username) ? $username : '',
'CUR_PASSWORD' => isset($cur_password) ? $cur_password : '',
'NEW_PASSWORD' => isset($new_password) ? $new_password : '',
'PASSWORD_CONFIRM' => isset($password_confirm) ? $password_confirm : '',
'EMAIL' => isset($email) ? $email : '',
'CONFIRM_IMG' => $confirm_image,
'YIM' => $yim,
'ICQ' => $icq,