X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Fprofile_modification.php;h=ef7cbdf6952328caeee291b16dcb74e5394bc327;hb=b86e9a57515f7683112b917e8b235650759e93ec;hp=6e856e5542b80ba63ae180639c28535b094b293b;hpb=d6c464056199e17ce8d304b54dbdaad498245a39;p=platal.git diff --git a/bin/cron/profile_modification.php b/bin/cron/profile_modification.php index 6e856e5..ef7cbdf 100755 --- a/bin/cron/profile_modification.php +++ b/bin/cron/profile_modification.php @@ -31,9 +31,10 @@ $res = XDB::iterator('SELECT p.hrpid, pm.pid, a.full_name, pm.field, pm.oldText INNER JOIN profile_display AS pd ON (pm.pid = pd.pid) INNER JOIN account_profiles AS ap ON (pm.pid = ap.pid AND FIND_IN_SET(\'owner\', ap.perms)) INNER JOIN aliases AS al ON (ap.uid = al.uid AND FIND_IN_SET(\'bestalias\', al.flags)) - ORDER BY pm.pid, pm.field'); + WHERE pm.type = \'third_party\' AND pm.field != \'deathdate\' + ORDER BY pm.pid, pm.field, pm.timestamp'); -if ($res-total() > 0) { +if ($res->total() > 0) { $date = time(); $values = $res->next(); @@ -83,7 +84,8 @@ if ($res-total() > 0) { $mailer->assign('date', $date); $mailer->send(); - XDB::execute('DELETE FROM profile_modifications'); + XDB::execute('DELETE FROM profile_modifications + WHERE type = \'third_party\''); } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: