summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2015-05-12 23:38:54 +0200
committerFelix Dörre <felix@dogcraft.de>2015-05-12 23:47:29 +0200
commit0c74160092fc85ed503f7cd93f231dd0e6d780fa (patch)
tree5ca713e3f086f4e643d8f1b5da15dd46f83b1f2d
parent80d3a9af2c566fc5a041458b38c3a7fca00aaebf (diff)
downloadcacert-devel-bug-1046.tar.gz
cacert-devel-bug-1046.tar.xz
cacert-devel-bug-1046.zip
bug 1046: ignoring deleted assurers in cron/updatesort.phpbug-1046
for displaying numbers wot.php?id=1 correctly
-rwxr-xr-xscripts/cron/updatesort.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/cron/updatesort.php b/scripts/cron/updatesort.php
index 051b179..4b2c29b 100755
--- a/scripts/cron/updatesort.php
+++ b/scripts/cron/updatesort.php
@@ -28,7 +28,7 @@
mysql_query("update `locations` set `acount`=0");
$query = "SELECT `users`.`locid` AS `locid`, count(*) AS `total` FROM `users`
- WHERE users.assurer='1' AND `users`.`locid` != 0 and users.listme=1
+ WHERE users.assurer='1' AND `users`.`locid` != 0 and users.listme=1 and `users`.`deleted` = 0
GROUP BY `users`.`locid`";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
@@ -41,7 +41,7 @@
mysql_query("update `regions` set `acount`=0");
$query = "SELECT `users`.`regid` AS `regid`, count(*) AS `total` FROM `users`
- WHERE users.assurer='1' AND `users`.`regid` != 0 and users.listme=1
+ WHERE users.assurer='1' AND `users`.`regid` != 0 and users.listme=1 and `users`.`deleted` = 0
GROUP BY `users`.`regid`";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
@@ -56,7 +56,7 @@
mysql_query("update `countries` set `acount`=0");
$query = "SELECT `users`.`ccid` AS `ccid`, count(*) AS `total` FROM `users`
- WHERE users.assurer='1' AND `users`.`ccid` != 0 and users.listme=1
+ WHERE users.assurer='1' AND `users`.`ccid` != 0 and users.listme=1 and `users`.`deleted` = 0
GROUP BY `users`.`ccid`";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))