mariusbutuc

MariusButuc

Mar 12th, 2010
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #**
  2. * Count number of players with active Limitations
  3. * @author MariusButuc
  4. *
  5. * @param $period [ daily | weekly ]
  6. * @param $limit the maximum bet-able € limit
  7. *#
  8. #macro(limitedPlayers $period $limit)
  9. #if($period == 'daily')
  10. #set($period = 'dailyCurrentLimit')
  11. #else
  12. #set($period = 'weeklyCurrentLimit')
  13. #end
  14. #set($hql = ", BaseObject as obj, IntegerProperty as prop where doc.fullName=obj.name and obj.className='XWiki.XWikiUsers' and prop.id.id = obj.id and prop.name='$period' and prop.value = $limit")
  15. #set($results = $xwiki.searchDocuments($hql))
  16. #set($count = $listtool.size($results))
  17. #end
Add Comment
Please, Sign In to add comment