From 30fc8ee73a7f6b03645fd38ee12c2f86083b873c Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Thu, 9 Nov 2006 15:24:45 +0000 Subject: [PATCH] Display the name of non-X in member list instead of email (if available) git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1068 839d8a87-29fc-0310-9880-83ba4fa771e5 --- modules/lists.php | 4 ++-- modules/lists/lists.inc.php | 2 +- templates/listes/members.tpl | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/lists.php b/modules/lists.php index 1462fbb..516a88e 100644 --- a/modules/lists.php +++ b/modules/lists.php @@ -533,8 +533,8 @@ class ListsModule extends PLModule } if (list($det,$mem,$own) = $this->client->get_members($liste)) { - $membres = list_sort_members($mem, $tri_promo); - $moderos = list_sort_owners($own, $tri_promo); + $membres = list_sort_members($mem, @$tri_promo); + $moderos = list_sort_owners($own, @$tri_promo); $page->assign_by_ref('details', $det); $page->assign_by_ref('members', $membres); diff --git a/modules/lists/lists.inc.php b/modules/lists/lists.inc.php index 6382e7d..e327c22 100644 --- a/modules/lists/lists.inc.php +++ b/modules/lists/lists.inc.php @@ -45,7 +45,7 @@ function list_sort_owners(&$members, $tri_promo = true) { $key = $tri_promo ? 0 : strtoupper($nom{0}); $membres[$key][$nom.$m] = Array('n' => "$prenom $nom", 'l' => $mem, 'p' => (!$tri_promo ? 'non-X' : null)); } else { - $membres[0][] = Array('l' => $mem); + $membres[0][] = Array('l' => $mem, 'p' => (!$tri_promo ? 'non-X' : null)); } } } diff --git a/templates/listes/members.tpl b/templates/listes/members.tpl index 2777da8..dc05886 100644 --- a/templates/listes/members.tpl +++ b/templates/listes/members.tpl @@ -96,6 +96,8 @@ {if $promo} {$x.n} + {elseif $x.n} + {$x.n} {else} {$x.l} {/if} @@ -133,6 +135,8 @@ {if $promo} {$x.n} + {elseif $x.n} + {$x.n} {else} {$x.l} {/if} -- 2.1.4