Old tab layout has been deprecated, use another structure for CSV importer.
[platal.git] / modules / xnetevents.php
index d90b44d..56fc766 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -284,6 +284,7 @@ class XnetEventsModule extends PLModule
         $page->assign('admin', $admin);
         $page->assign('moments', $evt['moments']);
         $page->assign('money', $evt['money']);
+        $page->assign('telepayment', $evt['paiement_id']);
         $page->assign('tout', !Env::v('item_id', false));
     }
 
@@ -546,7 +547,7 @@ class XnetEventsModule extends PLModule
                     $nb = max(intval($nb), 0);
                     XDB::execute("REPLACE INTO groupex.evenements_participants
                                         VALUES ({?}, {?}, {?}, {?}, {?}, {?})",
-                                  $evt['eid'], $member['uid'], $id, $nb, '', $paid);
+                                  $evt['eid'], $member['uid'], $id, $nb, '', $id == 1 ? $paid : 0);
                 }
 
                 $res = XDB::query("SELECT COUNT(uid) AS cnt, SUM(nb) AS nb
@@ -562,7 +563,7 @@ class XnetEventsModule extends PLModule
             $evt = get_event_detail($eid, $item_id);
         }
 
-        $page->assign('evt', $evt);
+        $page->assign_by_ref('evt', $evt);
         $page->assign('tout', is_null($item_id));
 
         if (count($evt['moments'])) {