Changes for page Extensions Wiki

Last modified by Vincent Massol on 2017/03/01 17:23

From version 51.1
edited by Vincent Massol
on 2011/11/18 12:16
Change comment: There is no comment for this version
To version 52.1
edited by Vincent Massol
on 2012/02/12 14:56
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -5,12 +5,14 @@
5 5  ## - It's displays the list of extensions (when there's no "id" request parameter)
6 6  ##
7 7  #if ("$!request.id" != "")
8 + ## Remove the part after ":::" (see top level pom.xml source for explanation as to why)
9 + #set ($id = $stringtool.substringBefore($request.id, ":::"))
8 8   ## Locate the extension by its id
9 9   ## Special case, if the id is the one of the top level POM, then redirect to the main wiki
10 - #if ($request.id == "org.xwiki.commons:xwiki-commons")
12 + #if ($id == "org.xwiki.commons:xwiki-commons")
11 11   $response.sendRedirect($xwiki.getURL("xwiki:Main.WebHome"))
12 12   #else
13 - #set ($xwql = "where doc.object(ExtensionCode.ExtensionClass).id = '$request.id'")
15 + #set ($xwql = "where doc.object(ExtensionCode.ExtensionClass).id = '$id'")
14 14   #set ($result = $services.query.xwql($xwql).execute())
15 15   #if ($result.size() > 0)
16 16   $response.sendRedirect($xwiki.getURL($result.get(0)))

Get Connected