diff options
author | Bernhard Fröhlich <bernhard@cacert.org> | 2012-03-21 21:58:31 +0100 |
---|---|---|
committer | Bernhard Fröhlich <bernhard@cacert.org> | 2012-03-21 21:58:31 +0100 |
commit | bbdf9a0251c0de0564b7003f706d10996059b0a8 (patch) | |
tree | a18862421a0f938e7c0c0baf1dea0d35296f42c4 /scripts/cron/updatesort.php | |
parent | 65f0dfcee2d36c8bd993fc4bf46a8aedf9e81d56 (diff) | |
download | cacert-devel-bbdf9a0251c0de0564b7003f706d10996059b0a8.tar.gz cacert-devel-bbdf9a0251c0de0564b7003f706d10996059b0a8.tar.xz cacert-devel-bbdf9a0251c0de0564b7003f706d10996059b0a8.zip |
Commented out last changes, but keep them there to more easily set up bug-1024, see https://bugs.cacert.org/view.php?id=1003#c2886
Diffstat (limited to 'scripts/cron/updatesort.php')
-rwxr-xr-x | scripts/cron/updatesort.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/cron/updatesort.php b/scripts/cron/updatesort.php index 93db060..498eda2 100755 --- a/scripts/cron/updatesort.php +++ b/scripts/cron/updatesort.php @@ -26,7 +26,10 @@ We may have some performance problems here, there are 150k assurances and 220k users in the production database. The exists-clause on cats_passed should be a good filter... */ - + + /* Synchronisation of assurer flag currently deactivated, see https://bugs.cacert.org/view.php?id=1003 + and https://bugs.cacert.org/view.php?id=1024 */ +/* $query = "select `n`.`to` as `uid` from `notary` as `n`, `users` as `u` ". " where `n`.`to`=`u`.`id` and `u`.`assurer`<>'1' ". " and (`n`.`expire` > now() OR `n`.`expire` IS NULL) ". @@ -41,12 +44,15 @@ //echo $query."\n"; mysql_query($query); } - +*/ /* Remove assurer flag from accounts not eligible. Also a bit performance critical, but assurer flag is only set at 5k accounts */ + /* Synchronisation of assurer flag currently deactivated, see https://bugs.cacert.org/view.php?id=1003 + and https://bugs.cacert.org/view.php?id=1024 */ +/* $query = "select `u`.id as `uid` from `users` as `u` " . " where `u`.`assurer` = '1' ". " and (not exists(select 1 from `cats_passed` as `cp`, `cats_variant` as `cv` ". @@ -59,6 +65,7 @@ //echo $query."\n"; mysql_query($query); } +*/ mysql_query("update `locations` set `acount`=0"); $query = "SELECT `users`.`locid` AS `locid`, count(*) AS `total` FROM `users` |