Hi,
The code from the "My recent modifications" panel doesn't help much, as
it lists only documents which have the user as the most recent author,
and not those that were sometime edited by the user.
A proper query would be:
select distinct doc.fullName from XWikiDocument doc, XWikiRCSNodeInfo ni
where ni.id.docId = doc.id and ni.author = 'the user name'
This query lists only the name of the documents, not the versions. If
you also need the version numbers, use this:
select doc.fullName, ni.id.version1, ni.id.version2 from XWikiDocument
doc, XWikiRCSNodeInfo ni where ni.id.docId = doc.id and ni.author = 'the
user name'
These queries need programming rights, so you will have to write a java
plugin that executes them and use the plugin from velocity, or put them
in a page that will always have programming rights.
Sergiu
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Paul Libbrecht wrote:
hello,
what would be the query to obtain all the documents that a user has
been editing, at any revision?
thanks
paul
Hi Paul
Could the code in My Recent Modifications panel help you?
#set($recentDocs = $xwiki.searchDocuments("where 1=1 and
doc.author='$context.user' order by doc.date desc", 5, 0))
#if($recentDocs.size() > 0 || $showEmptyPanels)
#panelheader($msg.get("My Recent Modifications"))
#set($first = true)
#foreach($docname in $recentDocs)
#set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
#if($first == true)
#set($first = false)
#else
<span class="pitemseparator"> | </span>
#end
<span class="panelitem"><a
href="$rdoc.getURL("view")">$rdoc.displayTitle</a></span>
#end
#panelfooter()
#end
HTH,
Ricardo
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users