summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2013-09-11 00:36:44 +0200
committerMichael Tänzer <neo@nhng.de>2013-09-11 00:36:44 +0200
commit502b87fdedec8226196a1649ac15f17b2fa3cc7e (patch)
treeffe784de4be51f7a712e4f2ab874b98d9612a660
parente3a3015cf550207a4267462d2362f3f89bb63a11 (diff)
downloadcacert-devel-502b87fdedec8226196a1649ac15f17b2fa3cc7e.tar.gz
cacert-devel-502b87fdedec8226196a1649ac15f17b2fa3cc7e.tar.xz
cacert-devel-502b87fdedec8226196a1649ac15f17b2fa3cc7e.zip
Bug 1065: Properly check if the user now has more than 100 points and don't
send the new total sum of points to the assurer Signed-off-by: Michael Tänzer <neo@nhng.de>
-rw-r--r--www/wot.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/www/wot.php b/www/wot.php
index e6fde89..f67b875 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -331,7 +331,7 @@ $iecho= "c";
$assurer = $_SESSION['profile']['fname'].' '.$_SESSION['profile']['lname'];
$body = sprintf(_("You are receiving this email because you have been assured by %s (%s)."), $assurer, $_SESSION['profile']['email'])."\n\n";
- if($_POST['points'] != $newpoints)
+ if(($oldpoints + $newpoints) >= 100)
$body .= sprintf(_("You were issued %s points however the system only counts up to 100 assurance points. You now have 100 countable assurance points and %s countable expierence points."), $_POST['points'], ($newpoints + $oldpoints-100))."\n\n";
else
$body .= sprintf(_("You were issued %s points and you now have %s points in total."), $newpoints, ($newpoints + $oldpoints))."\n\n";
@@ -368,10 +368,7 @@ $iecho= "c";
$assuree = $_SESSION['_config']['notarise']['fname'].' '.$_SESSION['_config']['notarise']['lname'];
$body = sprintf(_("You are receiving this email because you have assured %s (%s)."), $assuree, $_SESSION['_config']['notarise']['email'])."\n\n";
- if($_POST['points'] != $newpoints)
- $body .= sprintf(_("You issued %s points however the system only counts up to 100 assurance points. %s has now 100 countable assurance points and %s countable expierence points."), $_POST['points'], $assuree, ($newpoints + $oldpoints-100))."\n\n";
- else
- $body .= sprintf(_("You issued %s points and %s now has %s points in total."), $newpoints, $assuree, ($newpoints + $oldpoints))."\n\n";
+ $body .= sprintf(_("You issued %s points."), $newpoints)."\n\n";
if($_SESSION['profile']['board'] == 1 && intval($_POST['expire']) > 0)
$body .= sprintf(_("Please Note: this is a temporary increase for %s days only. After that time their points will be reduced to 150 points."), intval($_POST['expire']))."\n\n";