Wiki source code of Copy Snippets from e.x.o to snippets.x.o
Last modified by Vincent Massol on 2016/07/22 14:59
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | #if ($request.confirm == '1') | ||
3 | #set ($xwql = "where doc.object(ExtensionCode.ExtensionClass).type = 'snippet'") | ||
4 | #foreach ($snippetReferenceString in $services.query.xwql($xwql).execute()) | ||
5 | ## Resolve the reference and replace the wiki part with the new wiki name | ||
6 | #set ($sourceReference = $services.model.resolveDocument($snippetReferenceString)) | ||
7 | #set ($targetReference = $services.model.resolveDocument($snippetReferenceString, $services.model.createWikiReference('snippets'))) | ||
8 | #set ($discard = $services.refactoring.rename($sourceReference, $targetReference).join()) | ||
9 | #end | ||
10 | #end | ||
11 | {{/velocity}} |