From 1bab8330f1e2c946935fe9baac080f0d319054e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Thu, 3 Mar 2011 23:23:01 +0100 Subject: [PATCH] Displays antispam level in users email admin pages (Closes #1315). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- ChangeLog | 1 + include/emails.inc.php | 4 +++- templates/admin/user.tpl | 11 +++++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e697fe5..20b5c77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ VERSION 1.1.0 XX XX XXXX Bug/Wish: * Admin: + - #1315: Displays antispam level in users email admin pages -JAC - #1399: Displays all similar entreprises only on demand -JAC - #1403: Displays grade if any in medal validation process -JAC diff --git a/include/emails.inc.php b/include/emails.inc.php index c09a7b4..5f98fff 100644 --- a/include/emails.inc.php +++ b/include/emails.inc.php @@ -296,7 +296,7 @@ function ids_from_mails(array $emails) // The Bogo class represents a spam filtering level in plat/al architecture. class Bogo { - private static $states = array( + public static $states = array( 0 => 'default', 1 => 'let_spams', 2 => 'tag_spams', @@ -393,6 +393,7 @@ class Email public $display_email; public $domain; public $action; + public $filter_level; // Redirection status properties. public $active; @@ -426,6 +427,7 @@ class Email $this->$status = ($status == $row['flags']); } $this->sufficient = ($this->type == 'smtp' || $this->type == 'googleapps'); + $this->filter_level = ($this->type == 'imap') ? null : array_search($this->action, Bogo::$states); $this->user = &$user; } diff --git a/templates/admin/user.tpl b/templates/admin/user.tpl index dc8794d..c5ab851 100644 --- a/templates/admin/user.tpl +++ b/templates/admin/user.tpl @@ -381,7 +381,7 @@ $(function() { {xsrf_token_field} - @@ -414,6 +414,9 @@ $(function() { {if $mail->email == 'googleapps'}{/if} {if $mail->broken} (en panne){/if} + {if $mail->panne && $mail->panne neq "0000-00-00"} - - -
+ Redirections
+ {if $mail->type != 'imap'}(niveau {$mail->filter_level} : {$mail->action}){/if} + {if $mail->is_removable()} {icon name=cross} @@ -422,7 +425,7 @@ $(function() {
+ {icon name=error title="Panne"} Panne de {$mail->display_email} le {$mail->panne|date_format} {if $mail->panne neq $mail->last}confirmée le {$mail->last|date_format}{/if} @@ -438,7 +441,7 @@ $(function() { Ajouter une adresse + @@ -451,7 +454,7 @@ $(function() {
+ {if $actives} {/if} -- 2.1.4