diff options
author | Felix Dörre <felix@dogcraft.de> | 2015-02-24 23:47:20 +0100 |
---|---|---|
committer | Felix Dörre <felix@dogcraft.de> | 2015-02-25 00:20:21 +0100 |
commit | c8ab3e8010d33158f127fe0c6a89966f9395898a (patch) | |
tree | 978badd0e93f37548eb4a874245a18dc8d4d6dac | |
parent | 21a7023d57d54c2245a51814c91391abf0790b39 (diff) | |
download | cacert-devel-c8ab3e8010d33158f127fe0c6a89966f9395898a.tar.gz cacert-devel-c8ab3e8010d33158f127fe0c6a89966f9395898a.tar.xz cacert-devel-c8ab3e8010d33158f127fe0c6a89966f9395898a.zip |
bug-1050: fix queries to calculate points according to 'new calculation'
-rw-r--r-- | www/wot.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/www/wot.php b/www/wot.php index 35dce1f..e28233b 100644 --- a/www/wot.php +++ b/www/wot.php @@ -342,7 +342,7 @@ function send_reminder() if($newpoints < 0) $newpoints = $awarded = 0; - $query = "select sum(`points`) as `total` from `notary` where `to`='".intval($_SESSION['_config']['notarise']['id'])."' and `deleted` = 0 group by `to`"; + $query = "select sum(`awarded`) as `total` from `notary` where `to`='".intval($_SESSION['_config']['notarise']['id'])."' and `deleted` = 0 group by `to`"; $res = mysql_query($query); $drow = mysql_fetch_assoc($res); @@ -491,8 +491,8 @@ function send_reminder() $subject = $_REQUEST['subject']; $userid = intval($_REQUEST['userid']); $user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($userid)."' and `listme`=1")); - $points = mysql_num_rows(mysql_query("select sum(`points`) as `total` from `notary` - where `to`='".intval($user['id'])."' and `deleted` = 0 group by `to` HAVING SUM(`points`) > 0")); + $points = mysql_num_rows(mysql_query("select sum(`awarded`) as `total` from `notary` + where `to`='".intval($user['id'])."' and `deleted` = 0 group by `to` HAVING SUM(`awarded`) > 0")); if($points > 0) { $my_translation = L10n::get_translation(); |