From: Stéphane Jacob Date: Sat, 3 Jul 2010 15:52:55 +0000 (+0200) Subject: Prevents 'text' emails to have an incorrect remaining 'html' part. X-Git-Tag: xorg/1.0.1~15^2~62 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3be72fe1102b437996997bc7482d53dabb4b4c3f;p=platal.git Prevents 'text' emails to have an incorrect remaining 'html' part. Signed-off-by: Stéphane Jacob --- diff --git a/bin/cron/notifs.send.php b/bin/cron/notifs.send.php index e49ab56..cdd07b8 100755 --- a/bin/cron/notifs.send.php +++ b/bin/cron/notifs.send.php @@ -31,16 +31,17 @@ $uids = XDB::query('SELECT uid ORDER BY uid'); $iterator = User::iterOverUIDs($uids->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);