Changeset 2616


Ignore:
Timestamp:
Jan 31, 2012, 2:05:45 PM (8 years ago)
Author:
goya
Message:

fix alertes sans mail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/lib/task/sendAlertTask.class.php

    r2516 r2616  
    2323    $solr = new SolrConnector();
    2424    $query = Doctrine::getTable('Alerte')->createQuery('a')->where('next_mail < NOW()')->andWhere('confirmed = 1');
    25     foreach($query->execute() as $alerte) {
     25    foreach($query->execute() as $alerte) if (preg_match("/\w@\w/", $alerte->email)) {
    2626      $date = strtotime(preg_replace('/ /', 'T', $alerte->last_mail)."Z")+1;
    2727      $query = '('.$alerte->query.") date:[".date('Y-m-d', $date).'T'.date('H:i:s', $date)."Z TO ".date('Y-m-d').'T'.date('H:i:s')."Z]";
Note: See TracChangeset for help on using the changeset viewer.