From d4df0f0f47106ebb682f54102dfeb9587dec2ffe Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Wed, 1 Sep 2004 21:55:32 +0000 Subject: [PATCH] profil now uses new spouse scheme --- include/profil/get_general.inc.php | 7 ++++--- include/profil/get_poly.inc.php | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/profil/get_general.inc.php b/include/profil/get_general.inc.php index d7396fb..0e579fc 100644 --- a/include/profil/get_general.inc.php +++ b/include/profil/get_general.inc.php @@ -18,19 +18,20 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: get_general.inc.php,v 1.1 2004-08-31 15:03:33 x2000habouzit Exp $ + $Id: get_general.inc.php,v 1.2 2004-09-01 21:55:32 x2000habouzit Exp $ ***************************************************************************/ // on ramène les données du profil connecté (uid paramètre de session) $sql = "SELECT u.nom, u.prenom". - ", u.promo, epouse, FIND_IN_SET('femme',i.flags), nationalite". + ", u.promo, a.alias as epouse, FIND_IN_SET('femme',i.flags), nationalite". ", mobile". ", web". ", libre". - ", alias". + ", u.alias". ", a1.aid, a1.type". ", a2.aid, a2.type". " FROM auth_user_md5 AS u". + " LEFT JOIN aliases AS a ON(u.user_id = a.id AND a.type='epouse')" . " LEFT JOIN applis_ins AS a1 ON(a1.uid = u.user_id and a1.ordre = 0)". " LEFT JOIN applis_ins AS a2 ON(a2.uid = u.user_id and a2.ordre = 1)". " LEFT JOIN identification AS i ON(u.matricule = i.matricule) ". diff --git a/include/profil/get_poly.inc.php b/include/profil/get_poly.inc.php index b93d8a8..26a0b2e 100644 --- a/include/profil/get_poly.inc.php +++ b/include/profil/get_poly.inc.php @@ -18,17 +18,17 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: get_poly.inc.php,v 1.1 2004-08-31 19:09:19 x2000habouzit Exp $ + $Id: get_poly.inc.php,v 1.2 2004-09-01 21:55:32 x2000habouzit Exp $ ***************************************************************************/ //declaration des fonctions msarty pour les binets et groupex -$sql = "SELECT u.nom, u.prenom". - ", u.promo, epouse, i.flags, section". - " FROM auth_user_md5 AS u". - " LEFT JOIN identification AS i ON(u.matricule = i.matricule) ". - " WHERE user_id=".$_SESSION['uid']; +$sql = "SELECT u.nom, u.prenom, u.promo, a.alias as epouse, i.flags, section + FROM auth_user_md5 AS u + LEFT JOIN identification AS i ON(u.matricule = i.matricule) + LEFT JOIN aliases AS a ON(u.user_id = a.id AND type='epouse') + WHERE user_id=".$_SESSION['uid']; $result = $globals->db->query($sql); list($nom, $prenom, $promo, $epouse, $flags, $section) = mysql_fetch_row($result); -- 2.1.4