Fix subscription to event not associated with a payment
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 27 Jan 2007 19:16:24 +0000 (19:16 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 27 Jan 2007 19:16:24 +0000 (19:16 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1415 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/xnetevents.php

index 10672f7..1cc13d7 100644 (file)
@@ -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(