From: x2000habouzit Date: Sat, 27 Nov 2004 16:01:03 +0000 (+0000) Subject: closes #231 X-Git-Tag: xorg/old~771 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=75a0b2edc5153af34d65167732b57d24986d059b;p=platal.git closes #231 --- diff --git a/ChangeLog b/ChangeLog index bce28af..29ef281 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,9 @@ Bug/Wish : * Fiche : - #83,208,222 : New fiche. -MC + * Lists : + - #231 : Add a link to the user's fiche on moderation page. -MC + * User Interface : - #211 : All imgs in the skins are links to login.php. -MC diff --git a/htdocs/listes/moderate.php b/htdocs/listes/moderate.php index 9b08fc5..27fd105 100644 --- a/htdocs/listes/moderate.php +++ b/htdocs/listes/moderate.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: moderate.php,v 1.22 2004-11-22 20:04:44 x2000habouzit Exp $ + $Id: moderate.php,v 1.23 2004-11-27 16:01:03 x2000habouzit Exp $ ***************************************************************************/ if(empty($_REQUEST['liste'])) header('Location: index.php'); @@ -53,6 +53,8 @@ if(isset($_REQUEST['mid'])) { $mailer->setFrom("$liste-bounces@polytechnique.org"); $mailer->addHeader('Reply-To', "$liste-owner@polytechnique.org"); + $mail = $client->get_pending_mail($liste, $mid); + if(isset($_REQUEST['mok'])) { unset($_GET['mid']); if($client->handle_request($liste,$mid,1,'')) { /** 1 = APPROVE **/ @@ -67,7 +69,6 @@ if(isset($_REQUEST['mid'])) { } } elseif(isset($_POST['mno'])) { $reason = stripslashes($_POST['reason']); - $mail = $client->get_pending_mail($liste, $mid); if($client->handle_request($liste,$mid,2,$reason)) { /** 2 = REJECT **/ $mailer->setSubject("Message refusé"); $texte = "le message suivant :\n\n" @@ -81,7 +82,6 @@ if(isset($_REQUEST['mid'])) { } } elseif(isset($_REQUEST['mdel'])) { unset($_GET['mid']); - $mail = $client->get_pending_mail($liste, $mid); if($client->handle_request($liste,$mid,3,'')) { /** 3 = DISCARD **/ $mailer->setSubject("Message supprimé"); $texte = "le message suivant :\n\n" @@ -132,6 +132,11 @@ if(isset($_REQUEST['sid'])) { $page->assign_by_ref('mail', $mail); } else { if(list($subs,$mails) = $client->get_pending_ops($liste)) { + foreach ($subs as $key=>$val) { + if (preg_match('/^([^.]*\.[^.]*\.\d\d\d\d)@polytechnique.org$/', $subs['addr'], $matches)) { + $subs[$key]['login'] = $matches[1]; + } + } $page->assign_by_ref('subs', $subs); $page->assign_by_ref('mails', $mails); } else diff --git a/templates/listes/moderate.tpl b/templates/listes/moderate.tpl index 7e379bc..14276c6 100644 --- a/templates/listes/moderate.tpl +++ b/templates/listes/moderate.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: moderate.tpl,v 1.20 2004-11-09 10:13:49 x2000habouzit Exp $ + $Id: moderate.tpl,v 1.21 2004-11-27 16:01:04 x2000habouzit Exp $ ***************************************************************************} {dynamic} @@ -43,7 +43,11 @@ {foreach from=$subs item=s} - {$s.name} + {$s.name}{if $s.login} + {* + *}Afficher la fiche + {/if} + {$s.addr} ajouter