From 2235cd7f2d11e5b4fdcc4ddd8d4da00a2ae80564 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 28 Feb 2010 11:58:50 +0100 Subject: [PATCH] Rename table ml_moderate to email_list_moderate. Signed-off-by: Florent Bruneau --- bin/cron/cron_ml_moderate.php | 6 +++--- modules/lists.php | 4 ++-- upgrade/account/copy_tables.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/cron/cron_ml_moderate.php b/bin/cron/cron_ml_moderate.php index 67db630..32e2ee2 100755 --- a/bin/cron/cron_ml_moderate.php +++ b/bin/cron/cron_ml_moderate.php @@ -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); } diff --git a/modules/lists.php b/modules/lists.php index cce4dd2..5e2b71c 100644 --- a/modules/lists.php +++ b/modules/lists.php @@ -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')); } diff --git a/upgrade/account/copy_tables.php b/upgrade/account/copy_tables.php index 6bf56cc..1fd5fde 100755 --- a/upgrade/account/copy_tables.php +++ b/upgrade/account/copy_tables.php @@ -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'); -- 2.1.4