Fix user selection when sending the newsletter.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 1 Jul 2010 13:46:47 +0000 (15:46 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 1 Jul 2010 13:46:47 +0000 (15:46 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
include/massmailer.inc.php

index a6dc702..808297e 100644 (file)
@@ -203,7 +203,7 @@ abstract class MassMailer
     public function sendToAll()
     {
         $this->setSent();
-        $query = XDB::format($this->getAllRecipients(), $this->id()) . ' LIMIT 60';
+        $query = XDB::format($this->getAllRecipients(), $this->_id) . ' LIMIT 60';
         $emailsCount = 0;
 
         while (true) {
@@ -216,6 +216,7 @@ abstract class MassMailer
                 $this->sendTo($user, $hash);
                 ++$emailsCount;
             }
+            print_r($sent);
             XDB::execute("UPDATE  {$this->_subscriptionTable}
                              SET  last = {?}
                            WHERE " . implode(' OR ', $sent), $this->_id);