From 350ea824e7e5bc40cea8fed12ef74f153c2e64e0 Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Mon, 9 May 2005 14:28:03 +0000 Subject: [PATCH] backport Patches applied: * opensource@polytechnique.org--2005/platal--release--0.9.6--patch-4 SQL qurey was faulty git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-633 --- include/xnet/mail.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xnet/mail.inc.php b/include/xnet/mail.inc.php index 328b959..6cc3844 100644 --- a/include/xnet/mail.inc.php +++ b/include/xnet/mail.inc.php @@ -33,11 +33,11 @@ function get_all_redirects($membres, $mls, $alias, &$client) $res = $globals->xdb->query( 'SELECT IF(u.nom, u.nom, m.nom) AS nom, IF(u.prenom, u.prenom, m.prenom) AS prenom, - IF(m.email, m.email, CONCAT(a.alias, "@polytechnique.org")) as email, + IF(m.email <> "", m.email, CONCAT(a.alias, "@polytechnique.org")) as email, FIND_IN_SET("femme", u.flags) AS sexe FROM groupex.membres AS m LEFT JOIN auth_user_md5 AS u ON (m.uid=u.user_id AND m.uid<50000) - INNER JOIN aliases AS a ON (a.id=u.user_id and a.type="a_vie") + LEFT JOIN aliases AS a ON (a.id=u.user_id and a.type="a_vie") WHERE asso_id = {?}', $globals->asso('id')); $tos = $res->fetchAllAssoc(); } -- 2.1.4