From: Florent Bruneau Date: Tue, 16 Oct 2007 19:20:30 +0000 (+0200) Subject: Some cleanup X-Git-Tag: xorg/0.9.16~276 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=86cdc38d92c6f7e4521bbf0b1faa6635e7fe05a6;p=platal.git Some cleanup --- diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index 114b220..78df9a9 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -483,11 +483,10 @@ class XnetGrpModule extends PLModule if (list($nom, $prenom, $promo, $uid) = $res->fetchOneRow()) { $res = XDB::query("SELECT COUNT(*) - FROM groupex.membres AS m - INNER JOIN aliases AS a ON (m.uid = a.id - AND a.type != 'homonyme') - WHERE a.alias = {?} AND m.asso_id = {?}", - $u, $globals->asso('id')); + FROM groupex.membres AS m + INNER JOIN aliases AS a ON (m.uid = a.id AND a.type != 'homonyme') + WHERE a.alias = {?} AND m.asso_id = {?}", + $u, $globals->asso('id')); $n = $res->fetchOneCell(); if ($n) { $page->kill("$prenom $nom est déjà membre du groupe !"); @@ -495,8 +494,8 @@ class XnetGrpModule extends PLModule } elseif (Env::has('accept')) { - XDB::execute("INSERT INTO groupex.membres - VALUES ({?}, {?}, 'membre', 'X', NULL, NULL, NULL, NULL, NULL)", + XDB::execute("INSERT INTO groupex.membres (asso_id, uid) + VALUES ({?}, {?})", $globals->asso('id'), $uid); $mailer = new PlMailer(); $mailer->addTo("$u@polytechnique.org");