adoro wrote:
> Hi all,
> 
> Can someone help me?
> I need urgent two HQL queries:
> 
> 1. Query for all "wanted pages" - pages that have been linked to, but are
> not yet written - new pages (links with the question mark next to them);

This should work:

#set($query = "select link.id.link from XWikiLink link where not exists
(from XWikiDocument doc where doc.fullName = link.id.link)")
#foreach($item in $xwiki.search($query))
 * $item
#end

Note that several bad entries are placed there because the link
detection process does not pre-run velocity, so lots of entries actually
point to velocity variables or javascript code. Definitely the backlinks
need to be revised in the new rendering.

> 2. The version number of the document I restored/rolled back to.
> 

That's a bit hard... Rollback is not an actual rollback, like pointing
back to an older version, but the old version is loaded from the history
and saved as a new version.

You could parse the version comment, which looks like: "Rollback to
version 2.1", and extract the version from there.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to