Revert "Initial work on the rewriting of the profile/edit page"
[platal.git] / bin / cron / emails.check.php
index afb3ed5..5ad8bbe 100755 (executable)
@@ -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";
     }
 }