From: Raphaël Barrois Date: Sun, 19 Sep 2010 15:31:56 +0000 (+0200) Subject: Fix listing of xnetevent participants. X-Git-Tag: xorg/1.0.1~15^2~8 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=d1965ef64c2cee4f6e1b4b531a754b5790902cf2;p=platal.git Fix listing of xnetevent participants. Signed-off-by: Raphaël Barrois --- diff --git a/modules/xnetevents.php b/modules/xnetevents.php index 4db4710..8702d79 100644 --- a/modules/xnetevents.php +++ b/modules/xnetevents.php @@ -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))); } } diff --git a/modules/xnetevents/xnetevents.inc.php b/modules/xnetevents/xnetevents.inc.php index 93f011c..237e3f7 100644 --- a/modules/xnetevents/xnetevents.inc.php +++ b/modules/xnetevents/xnetevents.inc.php @@ -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();