From e598c8f1c6a385135f0aed58926913d69ee55ba3 Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Tue, 28 Dec 2004 13:53:19 +0000 Subject: [PATCH] backport Patches applied: * opensource@polytechnique.org--2005/platal--release--0.9.3--patch-6 bugs * opensource@polytechnique.org--2005/platal--release--0.9.3--patch-7 bugs git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-155 --- htdocs/carnet/mescontacts.php | 4 ++-- htdocs/carnet/mescontacts_pdf.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/carnet/mescontacts.php b/htdocs/carnet/mescontacts.php index fcf74b9..69fe441 100644 --- a/htdocs/carnet/mescontacts.php +++ b/htdocs/carnet/mescontacts.php @@ -29,7 +29,7 @@ $user = Env::get('user'); switch (Env::get('action')) { case 'retirer': if (preg_match('/^\d+$/', $user)) { - if ($globals->db->query("DELETE FROM contacts WHERE uid = $uid' AND contact='$user'")) + if ($globals->db->query("DELETE FROM contacts WHERE uid = $uid AND contact='$user'")) { $page->trig("Contact retiré !"); } @@ -47,7 +47,7 @@ switch (Env::get('action')) { case "ajouter": require_once('user.func.inc.php'); - if ($login = get_user_login($user) !== false) { + if (($login = get_user_login($user)) !== false) { if ($globals->db->query("INSERT INTO contacts (uid, contact) SELECT $uid, id FROM aliases diff --git a/htdocs/carnet/mescontacts_pdf.php b/htdocs/carnet/mescontacts_pdf.php index e4bf6e3..c5955fb 100644 --- a/htdocs/carnet/mescontacts_pdf.php +++ b/htdocs/carnet/mescontacts_pdf.php @@ -28,7 +28,7 @@ $sql = "SELECT a.*,c.*,e.alias as epouse FROM auth_user_md5 AS a INNER JOIN contacts AS c ON ( a.user_id = c.contact ) LEFT JOIN aliases AS e ON ( a.user_id = e.id and FIND_IN_SET('epouse',e.flags) ) - WHERE c.uid = ".Session::getInt('uid']); + WHERE c.uid = ".Session::getInt('uid'); // choix de l'ordre des réponses (par promo ou par noms) if (Get::get('order') == "promo") { $sql .= " ORDER BY a.promo, a.nom, a.prenom"; -- 2.1.4