summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2015-05-05 19:09:30 +0200
committerBenny Baumann <BenBE@geshi.org>2015-05-05 19:09:30 +0200
commit70f867dca49fa2f999470913ff75f816bcbb700d (patch)
treee8907b51235fe0c5e9d3d95defa61c685d5221b9 /pages
parentaaffd10f8439c32bfbb8bfca83c08f98f23fb2c9 (diff)
parent77ed5c5b06c2dc8fafc74c1be5a6197bb45e0f11 (diff)
downloadcacert-devel-70f867dca49fa2f999470913ff75f816bcbb700d.tar.gz
cacert-devel-70f867dca49fa2f999470913ff75f816bcbb700d.tar.xz
cacert-devel-70f867dca49fa2f999470913ff75f816bcbb700d.zip
Merge branch 'bug-1042' into testserver-stable
Diffstat (limited to 'pages')
-rw-r--r--pages/account/55.php3
-rw-r--r--pages/wot/1.php3
-rw-r--r--pages/wot/9.php3
3 files changed, 5 insertions, 4 deletions
diff --git a/pages/account/55.php b/pages/account/55.php
index 24cc86d..1f01771 100644
--- a/pages/account/55.php
+++ b/pages/account/55.php
@@ -90,10 +90,11 @@
$query = '
SELECT `u`.`id`,
`u`.`assurer`,
- SUM(`points`)
+ SUM(`awarded`)
FROM `users` AS `u`,
`notary` AS `n`
WHERE `u`.`id` = \''.intval($_SESSION['profile']['id']).'\'
+ AND `n`.`method` != 'Administrative Increase' AND `n`.`from` != `n`.`to`
AND `n`.`to` = `u`.`id`
AND `expire` < NOW()
AND `n`.`deleted` = 0
diff --git a/pages/wot/1.php b/pages/wot/1.php
index 8062f38..e69178d 100644
--- a/pages/wot/1.php
+++ b/pages/wot/1.php
@@ -92,7 +92,8 @@
$query = "select *, `users`.`id` as `id` from `users`,`notary` where `listme`='1' and
`ccid`='".$ccid."' and `regid`='".$regid."' and
`locid`='".$locid."' and `users`.`id`=`notary`.`to` and `notary`.`deleted`=0
- group by `notary`.`to` HAVING SUM(`points`) >= 100 order by `points` desc";
+ AND `notary`.`method` != 'Administrative Increase' AND `notary`.`from` != `notary`.`to`
+ group by `notary`.`to` HAVING SUM(`awarded`) >= 100 order by `points` desc";
$list = mysql_query($query);
if(mysql_num_rows($list) > 0)
{
diff --git a/pages/wot/9.php b/pages/wot/9.php
index 7f030a0..ffdb26b 100644
--- a/pages/wot/9.php
+++ b/pages/wot/9.php
@@ -27,8 +27,7 @@
$user = mysql_fetch_array($res);
$userlang = L10n::normalise_translation($user['language']);
- $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 = get_received_total_points(intval($user['id']));
if($points <= 0) {
echo _("Sorry, I was unable to locate that user.");
} else {