Uses directory names to sort names in ML lists.
[platal.git] / modules / lists / lists.inc.php
index 733bb38..9f902c4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -33,17 +33,16 @@ function list_sort_owners(&$members, $tri_promo = true)
             $membres[0][] = array('l' => $mem, 'p' => (!$tri_promo ? 'inconnue' : null));
         } else {
             $uid = $user->id();
-            $nom = $user->fullName(); # XXX: Get a notion of 'last name' here, I want to sort user by lastnames
+            $nom = $user->directoryName();
             $promo = $user->promo();
             if (!$promo) {
                 $promo = 'non-X';
             }
-            $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});
             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);
         }
     }