X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Flists%2Flists.inc.php;h=0a8e0d27c9ffd3328e1133fdfc352801f4ffb00f;hb=cecdf74795e71ed038411915dad5e0dff6ea51fa;hp=733bb3805f93a4671eaf767c38e042390c5d442c;hpb=32742f846e13a7806dde6b7b912c423a46f933d8;p=platal.git diff --git a/modules/lists/lists.inc.php b/modules/lists/lists.inc.php index 733bb38..0a8e0d2 100644 --- a/modules/lists/lists.inc.php +++ b/modules/lists/lists.inc.php @@ -1,6 +1,6 @@ $mem, 'p' => (!$tri_promo ? 'inconnue' : null)); + $membres[0][] = array('l' => $mem, 'p' => (!$tri_promo ? 'inconnus' : null), 'n' => null, 'x' => null, 'b' => null); } else { $uid = $user->id(); - $nom = $user->fullName(); # XXX: Get a notion of 'last name' here, I want to sort user by lastnames - $promo = $user->promo(); + $nom = $user->directoryName(); + $promo = $user->category(); if (!$promo) { - $promo = 'non-X'; + $promo = 'extérieurs'; } - $broken = false; # XXX: fill it with the good value if the user has no valid email - $key = $tri_promo ? ($promo != 'non-X' ? $promo : 0) : strtoupper(@$nom{0}); + $key = $tri_promo ? ($promo != 'extérieurs' ? $promo : 0) : strtoupper(@$nom{0}); if ($tri_promo) { $promo = null; } - $membres[$key][$nom.$m] = Array('n' => $nom, 'l' => $m, 'p' => $promo, 'x' => $uid, 'b' => $broken); + $membres[$key][$nom.$mem] = array('n' => $nom, 'l' => $mem, 'p' => $promo, 'x' => $uid, 'b' => $user->lost); } } @@ -75,16 +74,17 @@ function list_sort_members($members, $tri_promo = true) } // }}} +// {{{ function list_fetch_basic_info -function list_fetch_names($members) +function list_fetch_basic_info($members) { $res = array(); foreach ($members as $member) { $user = User::getSilent($member); if (!$user) { - $res[] = $member; + $res[] = $member . ',,'; } else { - $res[] = $user->fullName(); + $res[] = $user->forlifeEmail() . ',' . $user->directoryName() . ',' . $user->promo(); } } return $res;