Changes for page Creating a FAQ Application (Manual)
Last modified by Fawad Ali on 2021/07/12
Change comment:
util.clearName no longer needed, xcontext instead of context
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -255,7 +255,6 @@ 255 255 256 256 * The first part of the code checks whether the page has a parameter. If so: 257 257 ** The name of the document that will be created is computed 258 -** The name is cleaned to remove extra characters 259 259 ** A check is done to verify the document doesn't exist yet 260 260 ** If everything's ok, the user is sent to the new document in inline edition mode 261 261 * The second part of the code is the actual FAQ creation form ... ... @@ -267,9 +267,9 @@ 267 267 {{velocity}} 268 268 #if("$!request.docName" != '') 269 269 ## Request for creating a new instance 270 - #set($docName = $ util.clearName(${request.docName}))269 + #set($docName = ${request.docName}) 271 271 #set($targetDocName = "${request.spaceName}.${docName}") 272 - #if(!$xwiki.exists($targetDocName) && $xwiki.hasAccessLevel('edit', $context.user, $targetDocName)) 271 + #if(!$xwiki.exists($targetDocName) && $xwiki.hasAccessLevel('edit', $xcontext.user, $targetDocName)) 273 273 $response.sendRedirect($xwiki.getURL($targetDocName, 'inline', "template=${escapetool.url($request.template)}&parent=${escapetool.url($request.parent)}")) 274 274 ## Stop processing, since we already sent a redirect. 275 275 #stop