Rename table ml_moderate to email_list_moderate.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 28 Feb 2010 10:58:50 +0000 (11:58 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 28 Feb 2010 10:58:50 +0000 (11:58 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
bin/cron/cron_ml_moderate.php
modules/lists.php
upgrade/account/copy_tables.php

index 67db630..32e2ee2 100755 (executable)
@@ -29,7 +29,7 @@ $handler    = time();
 while ($sent_mails < $globals->lists->max_mail_per_min
        && time() - $handler < 60) {
     // take a lock on a mail
-    XDB::execute("UPDATE  ml_moderate
+    XDB::execute("UPDATE  email_list_moderate
                      SET  handler = {?}
                    WHERE  handler IS NULL
                 ORDER BY  ts
@@ -40,7 +40,7 @@ while ($sent_mails < $globals->lists->max_mail_per_min
     $query = XDB::query("SELECT  nom, prenom, user_id, password,
                                  ml, domain, mid, action, message
                            FROM  auth_user_md5 AS u
-                     INNER JOIN  ml_moderate AS ml ON (u.user_id = ml.uid)
+                     INNER JOIN  email_list_moderate AS ml ON (u.user_id = ml.uid)
                           WHERE  ml.handler = {?}", $handler);
     list($nom, $prenom, $uid, $password, $list, $domain, $mid, $action, $reason) = $query->fetchOneRow();
 
@@ -115,7 +115,7 @@ while ($sent_mails < $globals->lists->max_mail_per_min
     }
 
     // release the lock
-    XDB::execute("DELETE FROM ml_moderate WHERE handler = {?}",
+    XDB::execute("DELETE FROM email_list_moderate WHERE handler = {?}",
                  $handler);
     sleep(60 * $count / $globals->lists->max_mail_per_min);
 }
index cce4dd2..5e2b71c 100644 (file)
@@ -64,7 +64,7 @@ class ListsModule extends PLModule
     {
         list($subs,$mails) = $this->client->get_pending_ops($list);
         $res = XDB::query("SELECT  mid
-                             FROM  ml_moderate
+                             FROM  email_list_moderate
                             WHERE  ml = {?} AND domain = {?}",
                           $list, $domain);
         $mids = $res->fetchColumn();
@@ -472,7 +472,7 @@ class ListsModule extends PLModule
             return false;
         }
         Get::kill('mid');
-        return XDB::execute("INSERT IGNORE INTO  ml_moderate
+        return XDB::execute("INSERT IGNORE INTO  email_list_moderate
                                          VALUES  ({?}, {?}, {?}, {?}, {?}, NOW(), {?}, NULL)",
                             $liste, $domain, $mid, S::i('uid'), $action, Post::v('reason'));
     }
index 6bf56cc..1fd5fde 100755 (executable)
@@ -87,7 +87,7 @@ copyTable('#x4dat#.emails_watch', 'email_watch');
 copyTable('#x4dat#.homonymes', 'homonyms');
 copyTable('#x4dat#.ip_watch', 'ip_watch');
 copyTable('#x4dat#.mx_watch', 'mx_watch');
-copyTable('#x4dat#.ml_moderate', 'ml_moderate');
+copyTable('#x4dat#.ml_moderate', 'email_list_moderate');
 
 copyTable('#x4dat#.postfix_blacklist', 'postfix_blacklist');
 copyTable('#x4dat#.postfix_mailseen', 'postfix_mailseen');