X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fmassmailer.inc.php;h=0279948c178ab5653273cdb73ad558576bf58863;hb=80136b4bf2ddabf61efba689db00e55f5e14901b;hp=af9a5bd1b4455420869c2f6cfadfa62b04f73ddf;hpb=3ad44e0807c527bacd69b6260aa0f41fa973be68;p=platal.git diff --git a/include/massmailer.inc.php b/include/massmailer.inc.php index af9a5bd..0279948 100644 --- a/include/massmailer.inc.php +++ b/include/massmailer.inc.php @@ -1,6 +1,6 @@ _table} AS n WHERE n.bits != 'new' AND {$where} - LIMIT 1"); + LIMIT 1"); if ($res->numRows() != 1) { return null; } @@ -108,7 +108,7 @@ abstract class MassMailer public function head($prenom = null, $nom = null, $sexe = null, $type = 'text') { if (is_null($prenom)) { - return $this->_head; + return $this->_head; } else { $head = $this->_head; $head = str_replace('', $sexe ? 'Chère' : 'Cher', $head); @@ -183,7 +183,8 @@ abstract class MassMailer INNER JOIN auth_user_quick AS q ON(q.user_id = u.user_id) INNER JOIN aliases AS a ON(u.user_id=a.id AND FIND_IN_SET('bestalias',a.flags)) LEFT JOIN emails AS e ON(e.uid=u.user_id AND e.flags='active') - WHERE ni.last < {?} AND ({$this->subscriptionWhere()}) AND e.email IS NOT NULL + WHERE ni.last < {?} AND ({$this->subscriptionWhere()}) AND + (e.email IS NOT NULL OR FIND_IN_SET('googleapps', u.mail_storage)) GROUP BY u.user_id"; } @@ -204,7 +205,7 @@ abstract class MassMailer XDB::execute("UPDATE {$this->_subscriptionTable} SET last = {?} WHERE " . implode(' OR ', $sent), $this->_id); - + sleep(60); } }