X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Fnotifs.send.php;h=8a873aa45e889ffc84753c81dc63a9eba264efe1;hb=3424387cde6c635ff16c3b5459c4caa88bb76e2e;hp=73b5a7381633daa66737b6501abb25e78087bac6;hpb=8c2640f60951177740b7f601fda70faa119fea1c;p=platal.git diff --git a/bin/cron/notifs.send.php b/bin/cron/notifs.send.php index 73b5a73..8a873aa 100755 --- a/bin/cron/notifs.send.php +++ b/bin/cron/notifs.send.php @@ -1,7 +1,7 @@ #!/usr/bin/php5 -q fetchColumn()); -$mailer = new PlMailer('carnet/notif.mail.tpl'); while($user = $iterator->next()) { $watch = new Watch($user); if ($watch->count() > 0) { $notifs = $watch->events(); + $mailer = new PlMailer('carnet/notif.mail.tpl'); $mailer->assign('sex', $user->isFemale()); $mailer->assign('yourself', $user->display_name); $mailer->assign('week', date('W - Y')); $mailer->assign('notifs', $notifs); $mailer->sendTo($user); + unset($mailer); unset($notifs); } unset($watch); @@ -52,5 +54,5 @@ XDB::execute("UPDATE watch_profile XDB::execute('DELETE FROM watch_profile WHERE ts < DATE_SUB(CURRENT_DATE, INTERVAL 15 DAY)'); -// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8: ?>