Fix listing of xnetevent participants.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 19 Sep 2010 15:31:56 +0000 (17:31 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 19 Sep 2010 15:31:56 +0000 (17:31 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
modules/xnetevents.php
modules/xnetevents/xnetevents.inc.php

index 4db4710..8702d79 100644 (file)
@@ -638,7 +638,7 @@ class XnetEventsModule extends PLModule
         $page->assign('absents', $absents);
         $page->assign('participants',
                       get_event_participants($evt, $item_id, UserFilter::sortByName(),
-                                             new PLLimit(NB_PER_PAGE), $ofs * NB_PER_PAGE));
+                                             new PLLimit(NB_PER_PAGE, $ofs * NB_PER_PAGE)));
     }
 }
 
index 93f011c..237e3f7 100644 (file)
@@ -109,7 +109,7 @@ function get_event_detail($eid, $item_id = false, $asso_id = null)
 // }}}
 
 // {{{ function get_event_participants()
-function get_event_participants(&$evt, $item_id, array $tri = array(), $count = null, $offset = null)
+function get_event_participants(&$evt, $item_id, array $tri = array(), $limit = null)
 {
     global $globals;
 
@@ -124,7 +124,7 @@ function get_event_participants(&$evt, $item_id, array $tri = array(), $count =
                                          WHERE  ep.eid = {?} AND nb > 0 ' . $append . '
                                       GROUP BY  ep.uid', $eid);
     $uf = new UserFilter(new PFC_True(), $tri);
-    $users = User::getBulkUsersWithUIDs($uf->filter(array_keys($query), $count, $offset));
+    $users = User::getBulkUsersWithUIDs($uf->filter(array_keys($query), $limit));
     $tab = array();
     foreach ($users as $user) {
         $uid = $user->id();