summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2015-04-07 22:12:23 +0200
committerBenny Baumann <BenBE@geshi.org>2015-04-29 20:40:05 +0200
commit555aa9b8cdbf7473b9874c18e0cb3b530c9781fb (patch)
treed4333ceee86e78c7c032c628c49f4604ad12f8ab
parent16cb7044fa31e618f969d6104d976a7bc087e1be (diff)
downloadcacert-devel-555aa9b8cdbf7473b9874c18e0cb3b530c9781fb.tar.gz
cacert-devel-555aa9b8cdbf7473b9874c18e0cb3b530c9781fb.tar.xz
cacert-devel-555aa9b8cdbf7473b9874c18e0cb3b530c9781fb.zip
bug-1055: fix points calculation in includes/lib/account.php
-rw-r--r--includes/lib/account.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/lib/account.php b/includes/lib/account.php
index dd8afd3..9e795c8 100644
--- a/includes/lib/account.php
+++ b/includes/lib/account.php
@@ -48,8 +48,9 @@ function fix_assurer_flag($userID = NULL)
AND `cp`.`user_id` = `u`.`id`
)
AND (
- SELECT SUM(`points`) FROM `notary` AS `n`
+ SELECT SUM(`awarded`) FROM `notary` AS `n`
WHERE `n`.`to` = `u`.`id`
+ AND `n`.`method` != 'Administrative Increase' AND `n`.`from` != `n`.`to`
AND (`n`.`expire` > now()
OR `n`.`expire` IS NULL)
AND `n`.`deleted` = 0
@@ -81,8 +82,9 @@ function fix_assurer_flag($userID = NULL)
AND `cp`.`user_id` = `u`.`id`
)
OR (
- SELECT SUM(`points`) FROM `notary` AS `n`
+ SELECT SUM(`awarded`) FROM `notary` AS `n`
WHERE `n`.`to` = `u`.`id`
+ AND `n`.`method` != 'Administrative Increase' AND `n`.`from` != `n`.`to`
AND (
`n`.`expire` > now()
OR `n`.`expire` IS NULL