summaryrefslogtreecommitdiff
path: root/manager/application
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2010-08-03 21:19:05 +0200
committerMichael Tänzer <neo@nhng.de>2010-08-03 21:19:05 +0200
commitbe39a06a110df826ced9fa6bd03e79ccd17f695c (patch)
treeb6c9c34a9c74602d094d59e5138efa3d1c7863b7 /manager/application
parent46d228ccc3d7e0ceb701802790de6de9717feef0 (diff)
downloadcacert-mgr-be39a06a110df826ced9fa6bd03e79ccd17f695c.tar.gz
cacert-mgr-be39a06a110df826ced9fa6bd03e79ccd17f695c.tar.xz
cacert-mgr-be39a06a110df826ced9fa6bd03e79ccd17f695c.zip
Fix Bug #830: Negative assurance points
If the user had more than 100 points adding more points through an automated assurance resulted in negative points Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'manager/application')
-rw-r--r--manager/application/controllers/ManageAccountController.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/manager/application/controllers/ManageAccountController.php b/manager/application/controllers/ManageAccountController.php
index 33eed81..e900d72 100644
--- a/manager/application/controllers/ManageAccountController.php
+++ b/manager/application/controllers/ManageAccountController.php
@@ -91,6 +91,11 @@ class ManageAccountController extends Zend_Controller_Action
$assurance['points'] = $assurance['awarded'];
}
+ // Only assign positive amounts
+ if ($assurance['points'] < 0){
+ $assurance['points'] = 0;
+ }
+
$this->db->insert('notary', $assurance);
$user['points'] += $assurance['points'];