WikiCode
LastWikiModificationsCode
en
0
WikiCode.WebHome
XWiki.Admin
XWiki.superadmin
xwiki:XWiki.Admin
1191514175000
1529283494000
1529283494000
1.1

#

Imported from XAR
false
xwiki/1.0
false
XWiki.TagClass
0
0
input
1
tags
1
Tags
1
|
|,
30
0
com.xpn.xwiki.objects.classes.StaticListClass
WikiCode.LastWikiModificationsCode
0
XWiki.TagClass
40144e4f-486a-42fc-82ad-95c98c3f84b2
############################################################################# ## Print the list of last modifications made on all wikis. Can be filtered by a provided user. ## ## Can use URL parameters : ## -nb : The maximum number of results to print. Default is 30. ## -user : Filter modification made by provided user. The modifications of any users are listed by default. ## -userwiki: The wiki of the user to filter by. Current database is used by default. ## ############################################################################# #if ($request.nb) #set($nb = $util.parseInt($request.nb)) #end ## #if ($request.user) #set($usermodifications = $request.user) #end #if ($request.userwiki) #set($usermodificationswiki = $request.userwiki) #end ############################################################################# #set($WikiManager = $xwiki.wikimanager) #if(!$WikiManager) #error($msg.get("wikimanager.pluginnotenabled")) #end #set($Globalsearch = $WikiManager.searchApi) ## #includeMacros("WikiCode.Macros") ## ############################################################################# ## #if(!$nb) #set($nb = 30) #end ## #if(!$wikinamelist) #if($wikilist) #set($wikinamelist = []) #foreach($wikidoc in $wikilist) #set($added = $wikinamelist.add($wikidoc.wikiName)) #end #else #if(!$allwikilist) #set($allwikilist = $WikiManager.getAllWikis()) #end ## #if(!$allwikinamelist) #set($allwikinamelist = []) #foreach($wikidoc in $allwikilist) #set($added = $allwikinamelist.add($wikidoc.wikiName)) #end ## #if(!$allwikinamelist.contains($context.mainWikiName)) #set($added = $allwikinamelist.add($context.mainWikiName)) #end #end ## #set($wikinamelist = $allwikinamelist) #end #end ## #set($sql = "where 1=1") #if($usermodifications) #if($context.database != $usermodificationswiki) #set($sql = "${sql} and doc.author='${usermodificationswiki}:${usermodifications}'") #else #set($sql = "${sql} and doc.author='${usermodifications}'") #end #end #set($sql = "${sql} order by doc.date desc") ## #set($query = $Globalsearch.newQuery()) $query.setHql($sql) $query.setWikiNameList($wikinamelist) $query.setMax($nb) ## #set($documentlist = $Globalsearch.searchDocuments($query, false)) ## ############################################################################# ## #foreach ($item in $documentlist) #displaymodification("$item.wiki - $item.displayTitle in $item.space" $item.prefixedFullName $item.date $formatDate $item.author true) #end ## #if (!$doc.name.equals("LastWikiModificationsCode")) <br/> #if ($usermodifications) #set($filter = "user=${usermodifications}") #if ($usermodificationswiki) #set($filter = "${filter}&amp;userwiki=${usermodificationswiki}") #end #end [See more>WikiCode.LastWikiModificationsCode#if($filter)?$filter#end] #end