From version 10.1
edited by Eduard Moraru
on 2018/02/22 15:18
To version 11.1
edited by Eduard Moraru
on 2018/02/22 15:19
Change comment: Fixed bug when saving the document with the changed contentAuthor field.

Summary

Details

ExtensionCode.ExtensionClass[0]
Description
... ... @@ -7,13 +7,13 @@
7 7  Requires Programming Rights to function.
8 8  
9 9  Step1:
10 -{{image reference='changeContentAuthorStep1.png' /}}
10 +{{image reference="changeContentAuthorStep1.png"/}}
11 11  
12 12  Step2:
13 -{{image reference='changeContentAuthorStep2.png' /}}
13 +{{image reference="changeContentAuthorStep2.png"/}}
14 14  
15 15  Step3:
16 -{{image reference='changeContentAuthorStep3.png' /}}
16 +{{image reference="changeContentAuthorStep3.png"/}}
17 17  
18 18  == Source ==
19 19  
... ... @@ -30,7 +30,7 @@
30 30   #foreach ($documentToUpdate in $documentsToUpdate)
31 31   #set ($document = $xwiki.getDocument($documentToUpdate))
32 32   #set ($discard = $document.document.setContentAuthorReference($newContentAuthorUserReference))
33 - #set ($discard = $xwiki.xWiki.save($document.document, "Changed content author", $xcontext.context))
33 + #set ($discard = $xwiki.xWiki.saveDocument($document.document, "Changed content author", $xcontext.context))
34 34   * [[$documentToUpdate]] ($documentToUpdate) - (/)
35 35   #end
36 36  
Show installed count
... ... @@ -1,0 +1,1 @@
1 +Yes

Get Connected