summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-03-25 14:22:45 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-03-25 14:22:45 +0000
commitc01f77be2a25e817905de48c72c6269302f3502e (patch)
tree4cc57acd0431f61d969e4734a7a115cc18fa825c
parentBertie ran of with my quotes ;-) (diff)
downloadphpbb-c01f77be2a25e817905de48c72c6269302f3502e.tar.gz
phpbb-c01f77be2a25e817905de48c72c6269302f3502e.tar.bz2
phpbb-c01f77be2a25e817905de48c72c6269302f3502e.zip
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
-rw-r--r--phpBB/includes/usercp_confirm.php4
-rw-r--r--phpBB/includes/usercp_register.php19
2 files changed, 10 insertions, 13 deletions
diff --git a/phpBB/includes/usercp_confirm.php b/phpBB/includes/usercp_confirm.php
index 24a94d728d..f829833246 100644
--- a/phpBB/includes/usercp_confirm.php
+++ b/phpBB/includes/usercp_confirm.php
@@ -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]);
diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php
index a9eb19e4b0..6197a7326e 100644
--- a/phpBB/includes/usercp_register.php
+++ b/phpBB/includes/usercp_register.php
@@ -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,