Changes for page Space Index

Last modified by Simon Urli on 2024/04/09 11:23

From version 11.1
edited by Vincent Massol
on 2013/10/15 14:51
Change comment: Import
To version 10.1
edited by Marius Dumitru Florea
on 2013/07/15 10:04
Change comment: Import

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.VincentMassol
1 +xwiki:XWiki.mflorea
XWiki.WikiMacroClass[0]
Macro code
... ... @@ -13,7 +13,7 @@
13 13   #if ("$!spaceMacroParam" != '')
14 14   #set ($spaceParam = $spaceMacroParam)
15 15   #end
16 - #set ($docNames = $services.query.hql('where doc.space=? order by doc.creationDate desc').setLimit($limit).bindValues([${spaceParam}]).execute())
16 + #set ($docNames = $xwiki.searchDocuments('where doc.space=? order by doc.creationDate desc', $limit, 0, [${spaceParam}]))
17 17   {{html}}
18 18   #displayDocumentList($docNames false [])
19 19   ## Note: we pass an empty blacklistedSpaces list since we are used as a space dashboard, not a global dashboard
... ... @@ -20,7 +20,7 @@
20 20   {{/html}}
21 21  
22 22   #if ($docNames.size() == $limit)
23 - #set ($docCount = $services.query.xwql('where doc.space = :space').bindValue('space', $spaceParam).addFilter('unique').count())
23 + #set ($docCount = $xwiki.countDocuments('where doc.space=?', [${spaceParam}]))
24 24   #set ($remaining = $mathtool.sub($docCount, $limit))
25 25   #if ($remaining > 0)
26 26   (% class="documentListMore" %) (((

Get Connected