summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-10-23 02:16:00 +0200
committerMichael Tänzer <neo@nhng.de>2011-10-23 02:16:00 +0200
commit5c12fb422ce9a446f9ccef4eba5070d9a33739a9 (patch)
tree65e659520a7b6915991194e8260b246c923aadb6 /www
parentc35b66293e32058491ee35aa2d7de3e1a8df65a2 (diff)
downloadcacert-devel-5c12fb422ce9a446f9ccef4eba5070d9a33739a9.tar.gz
cacert-devel-5c12fb422ce9a446f9ccef4eba5070d9a33739a9.tar.xz
cacert-devel-5c12fb422ce9a446f9ccef4eba5070d9a33739a9.zip
bug 894: A few cleanups and bug fixes.
- "A reminder notice has been sent." should be only shown once at the same page - "You are not an Assurer" was misleading, only somehow the other user was not recorded in the session (e.g. URL manipulation/hotlinking) - Reuse the data fetched moments ago instead of doing another SQL query - Compare instead of assignment - Make "Go Back" translatable Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'www')
-rw-r--r--www/wot.php26
1 files changed, 10 insertions, 16 deletions
diff --git a/www/wot.php b/www/wot.php
index b975e14..eef8b38 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -112,7 +112,6 @@ function send_reminder()
}
$_SESSION['_config']['remindersent'] = 1;
- $_SESSION['_config']['error'] = _("A reminder notice has been sent.");
}
@@ -142,13 +141,13 @@ function send_reminder()
if($oldid == 6 && intval($_SESSION['_config']['notarise']['id']) <= 0)
{
- show_page ("EnterEmail","","You are not an Assurer");
+ show_page ("EnterEmail","",_("Something went wrong. Please enter the email address again"));
exit;
}
if($oldid == 5 && array_key_exists('reminder',$_POST) && $_POST['reminder'] != "")
{
send_reminder();
- show_page ("EnterEmail","Reminder sent","");
+ show_page ("EnterEmail",_("A reminder notice has been sent."),"");
exit;
}
@@ -163,19 +162,14 @@ function send_reminder()
exit;
} else
{
- $_SESSION['_config']['notarise'] = mysql_fetch_assoc($res);
$_SESSION['_config']['noemailfound'] = 0;
+ $_SESSION['_config']['notarise'] = mysql_fetch_assoc($res);
+ if ($_SESSION['_config']['notarise']['verified'] == 0)
+ {
+ show_page("EnterEmail","",_("User is not yet verified. Please try again in 24 hours!"));
+ exit;
+ }
}
-
- $query = "select `verified` from `users` where `id`='".$_SESSION['_config']['notarise']['id']."'";
- $res = mysql_query($query);
- $drow = mysql_fetch_assoc($res);
- if ($drow['verified'] = 0)
- {
- show_page("EnterEmail","",_("User is not yet verified. Please try again in 24 hours!"));
- exit;
- }
-
}
if($oldid == 5 || $oldid == 6)
@@ -252,7 +246,7 @@ $iecho= "c";
if($newpoints < 0)
$newpoints = $awarded = 0;
-$query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['_config']['notarise']['id']."' group by `to`";
+ $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['_config']['notarise']['id']."' group by `to`";
$res = mysql_query($query);
$drow = mysql_fetch_assoc($res);
@@ -454,7 +448,7 @@ $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION[
{
sendmail($user['email'], "[CAcert.org] ".$_REQUEST['subject'], $_REQUEST['message'],
$_SESSION['profile']['email'], "", "", $_SESSION['profile']['fname']." ".$_SESSION['profile']['lname']);
- show_page("ContactAssurer",_("Your email has been sent to")." ".$user['fname'].".<br />[ <a href='javascript:history.go(-2)'>Go Back</a> ]","");
+ show_page("ContactAssurer",_("Your email has been sent to")." ".$user['fname'].".<br />[ <a href='javascript:history.go(-2)'>"._("Go Back")."</a> ]","");
exit;
} else {
show_page(0,"",_("Sorry, I was unable to locate that user."));