From: x2003bruneau Date: Sat, 27 Jan 2007 19:16:24 +0000 (+0000) Subject: Fix subscription to event not associated with a payment X-Git-Tag: xorg/0.9.13~56 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=30138a46a2e6525be77e354997a0086593eb7016;p=platal.git Fix subscription to event not associated with a payment git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1415 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/modules/xnetevents.php b/modules/xnetevents.php index 10672f7..1cc13d7 100644 --- a/modules/xnetevents.php +++ b/modules/xnetevents.php @@ -230,12 +230,13 @@ class XnetEventsModule extends PLModule // update actual inscriptions $updated = false; $total = 0; + $paid = $evt['paid'] ? $evt['paid'] : 0; foreach ($subs as $j => $nb) { if ($nb >= 0) { XDB::execute( "REPLACE INTO groupex.evenements_participants VALUES ({?}, {?}, {?}, {?}, {?})", - $eid, S::v('uid'), $j, $nb, $evt['paid']); + $eid, S::v('uid'), $j, $nb, $paid); $updated = $eid; } else { XDB::execute(