X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Fnotifs.send.php;h=e2433ff8e680083edc90ba8aaab9858230f827c2;hb=b53b9de75a3240e36c52b42cd8334664040dc776;hp=e49ab56c21fd4f6bb394ac0c999d4766f169e879;hpb=bbc7476ed266ed900cc53d2a6623bb05eba64b47;p=platal.git diff --git a/bin/cron/notifs.send.php b/bin/cron/notifs.send.php index e49ab56..e2433ff 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);