From 1d7483629aed3053cde7a3ba442bc0db00325956 Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Mon, 13 Dec 2004 16:39:46 +0000 Subject: [PATCH] refactor git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-88 --- htdocs/listes/admin.php | 2 +- htdocs/listes/trombi.php | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/htdocs/listes/admin.php b/htdocs/listes/admin.php index 70a98dd..0b9c1f1 100644 --- a/htdocs/listes/admin.php +++ b/htdocs/listes/admin.php @@ -35,7 +35,7 @@ if(isset($_REQUEST['add_member'])) { } $arr = $client->mass_subscribe($liste, Array($login)); - if(is_array($arr)) { + if (is_array($arr)) { foreach($arr as $addr) { $page->trig("{$addr[0]} inscrit."); } diff --git a/htdocs/listes/trombi.php b/htdocs/listes/trombi.php index 873f964..19c5bef 100644 --- a/htdocs/listes/trombi.php +++ b/htdocs/listes/trombi.php @@ -63,21 +63,7 @@ function getList($offset,$limit) { $owners = $client->get_owners($liste); if(is_array($owners)) { - $moderos = Array(); - foreach($owners[1] as $owner) { - list($m) = split('@',$owner); - $res = $globals->db->query("SELECT IF(epouse='', CONCAT(prenom, ' ', nom), CONCAT(prenom, ' ', epouse)), promo - FROM auth_user_md5 AS u - INNER JOIN aliases AS a ON u.user_id = a.id - WHERE a.alias = '$m'"); - if(list($nom, $promo) = mysql_fetch_row($res)) { - $moderos[$promo][] = Array('n' => $nom, 'l' => $m); - } else { - $moderos[0][] = Array('l' => $owner); - } - mysql_free_result($res); - } - ksort($moderos); + $moderos = list_sort_owners($owners[1]); $page->assign_by_ref('details', $owners[0]); $page->assign_by_ref('owners', $moderos); -- 2.1.4