X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Fcron%2Femails.check.php;h=5ad8bbe26c571eb42649276530fcf0aef04aac82;hb=35aedff220db98c5ef8267502d7288c5cdc17f4a;hp=afb3ed50f124c31a1d2192533c4150b8e42cabf9;hpb=a7de4ef724d1a3b0bf978a50ce7cc9d23412c7a0;p=platal.git diff --git a/bin/cron/emails.check.php b/bin/cron/emails.check.php index afb3ed5..5ad8bbe 100755 --- a/bin/cron/emails.check.php +++ b/bin/cron/emails.check.php @@ -32,13 +32,13 @@ require('./connect.db.inc.php'); $sql = "SELECT a1.alias, a2.alias, e1.email FROM emails AS e1 INNER JOIN emails AS e2 ON (e1.email = e2.email AND e1.uid != e2.uid - AND (e1.uid < e2.uid OR NOT FIND_IN_SET(e2.flags, 'active'))) + AND (e1.uid < e2.uid OR NOT FIND_IN_SET('active', e2.flags))) LEFT JOIN emails_watch AS w ON (e1.email = w.email) INNER JOIN aliases AS a1 ON (a1.id = e1.uid AND a1.type = 'a_vie') INNER JOIN aliases AS a2 ON (a2.id = e2.uid AND a2.type = 'a_vie') INNER JOIN auth_user_md5 AS u1 ON (a1.id = u1.user_id) INNER JOIN auth_user_md5 AS u2 ON (a2.id = u2.user_id) - WHERE FIND_IN_SET(e1.flags, 'active') AND u1.nom != u2.nom_usage AND u2.nom != u1.nom_usage AND w.email IS NULL + WHERE FIND_IN_SET('active', e1.flags) AND u1.nom != u2.nom_usage AND u2.nom != u1.nom_usage AND w.email IS NULL ORDER BY a1.alias"; $it = Xdb::iterRow($sql); @@ -58,9 +58,9 @@ if (count($conflits) > 0) { echo "\n\n"; $sql = "INSERT IGNORE INTO emails_watch (email, state, detection, last) VALUES " . join(", ", $insert); - Xdb::execute($sql); - if (mysql_errno() != 0) { - echo 'Error : ' . mysql_error() . "\n$sql"; + XDB::execute($sql); + if (XDB::errno() != 0) { + echo 'Error : ' . XDB::error() . "\n$sql"; } }