From: Stéphane Jacob Date: Tue, 18 Oct 2011 09:29:55 +0000 (+0200) Subject: Should fix payments lists in xnetevents. X-Git-Tag: xorg/1.1.4~89 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=c9e710ffc8562c5f0345f0070eb0ab21b7394596;p=platal.git Should fix payments lists in xnetevents. Signed-off-by: Stéphane Jacob --- diff --git a/modules/payment.php b/modules/payment.php index 66c56b2..6f4ed7f 100644 --- a/modules/payment.php +++ b/modules/payment.php @@ -278,7 +278,7 @@ class PaymentModule extends PLModule list($eid, $asso_id) = $res->fetchOneRow(); require_once dirname(__FILE__) . '/xnetevents/xnetevents.inc.php'; $evt = get_event_detail($eid, false, $asso_id); - subscribe_lists_event($user->id(), $evt['short_name'], 1, $amount, true); + subscribe_lists_event($user->id(), $evt['short_name'], 1, $montant, true); } /* on genere le mail de confirmation */ @@ -369,12 +369,13 @@ class PaymentModule extends PLModule $no_transaction, $user->id(), $ref, $fullref, $montant, $clef, Env::v('comment'), Get::i('display')); // We check if it is an Xnet payment and then update the related ML. - $res = XDB::query('SELECT eid + $res = XDB::query('SELECT eid, asso_id FROM group_events WHERE paiement_id = {?}', $ref); - if ($eid = $res->fetchOneCell()) { + if ($res->numRows() == 1) { + list($eid, $asso_id) = $res->fetchOneRow(); require_once dirname(__FILE__) . '/xnetevents/xnetevents.inc.php'; - $evt = get_event_detail($eid); + $evt = get_event_detail($eid, false, $asso_id); subscribe_lists_event($user->id(), $evt['short_name'], 1, $montant, true); }