From: Stéphane Jacob Date: Thu, 23 Apr 2009 19:33:44 +0000 (+0200) Subject: Notifies the sender when a moderated message to a ML is accepted. X-Git-Tag: xorg/0.10.1~110 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=52d032a7e8530600c0b28878ca298feacbe08403;p=platal.git Notifies the sender when a moderated message to a ML is accepted. --- diff --git a/modules/lists.php b/modules/lists.php index 4c5b223..b7e35d6 100644 --- a/modules/lists.php +++ b/modules/lists.php @@ -546,6 +546,21 @@ class ListsModule extends PLModule $msg = str_replace("%(listname)s", $liste, $msg); $page->assign('msg', $msg); return; + } elseif (Get::has('mid') && Env::has('mok')) { + $page->changeTpl('lists/moderate_mail.tpl'); + require_once('banana/moderate.inc.php'); + $params = array('listname' => $liste, 'domain' => $domain, + 'artid' => Get::i('mid'), 'part' => Get::v('part'), 'action' => Get::v('action')); + $params['client'] = $this->client; + run_banana($page, 'ModerationBanana', $params); + + $msg = file_get_contents('/etc/mailman/fr/accept.txt'); + $msg = str_replace("%(adminaddr)s", "$liste-owner@{$domain}", $msg); + $msg = str_replace("%(request)s", "<< SUJET DU MAIL >>", $msg); + $msg = str_replace("%(reason)s", "<< TON EXPLICATION >>", $msg); + $msg = str_replace("%(listname)s", $liste, $msg); + $page->assign('msg', $msg); + return; } $mail = $this->moderate_mail($domain, $liste, Env::i('mid'));