From 210f9202ea1c41c8dfe1ba212bccefba20fe8e3f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 13 Oct 2008 03:19:34 +0000 Subject: [PATCH] - web: fix bug in profile creation. fixes #755 svn path=/trunk/boinc/; revision=16194 --- checkin_notes | 6 ++++++ doc/index.php | 2 +- html/user/create_profile.php | 8 ++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 6fb5561098..41417f8a1a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -8305,3 +8305,9 @@ David 12 Oct 2008 html/inc/ forum.inc + +David 12 Oct 2008 + - web: fix bug in profile creation. fixes #755 + + html/user/ + create_profile.php diff --git a/doc/index.php b/doc/index.php index 0cc210ef78..501b016461 100644 --- a/doc/index.php +++ b/doc/index.php @@ -11,7 +11,7 @@ if ($host == "bolt.berkeley.edu") { } require_once("docutil.php"); -require_once("../html/inc/translation.inc"); +require_once("translation.inc"); function show_participant() { $i = rand(0, 99); diff --git a/html/user/create_profile.php b/html/user/create_profile.php index 53e694c2f2..81de5ca656 100644 --- a/html/user/create_profile.php +++ b/html/user/create_profile.php @@ -201,14 +201,14 @@ function process_create_profile($user, $profile) { $response2 = post_str('response2', true); $language = post_str('language'); - $profile->response1 = $response1; - $profile->response2 = $response2; $privatekey = parse_config($config, ""); if ($privatekey) { $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"] ); if (!$resp->is_valid) { + $profile->response1 = $response1; + $profile->response2 = $response2; show_profile_form($profile, "Your ReCaptcha response was not correct. Please try again." ); @@ -216,6 +216,8 @@ function process_create_profile($user, $profile) { } } if (!akismet_check($user, $response1)) { + $profile->response1 = $response1; + $profile->response2 = $response2; show_profile_form($profile, "Your first response was flagged as spam by the Akismet anti-spam system. Please modify your text and try again." @@ -223,6 +225,8 @@ function process_create_profile($user, $profile) { return; } if (!akismet_check($user, $response2)) { + $profile->response1 = $response1; + $profile->response2 = $response2; show_profile_form($profile, "Your second response was flagged as spam by the Akismet anti-spam system. Please modify your text and try again."