On 06/22/2010 05:38 PM, JoannaD wrote:
Hi Sergiu
Thank you very much for your response.
I've tried what you suggested earlier but it is still updating the modified
by and date.
Here's the code if you can spot anything wrong:
{{velocity}}
#set($web = "Sandbox")
#foreach($page in $xwiki.searchDocuments("doc.space = '$web' order by
doc.space, doc.name"))
#set($doc = $xwiki.getDocument("$page"))
* [[$doc]]
$doc.document.setCreator('XWiki.Admin')
#set($milli = $xwiki.parseLong("1274823000000"))
#set($tmpDate = $xwiki.getDate($milli))
$doc.document.setCreationDate($tmpDate)
$doc.document.setAuthor($doc.document.getAuthor())
$doc.document.setDate($doc.document.getDate())
$doc.document.setContentDirty(false)
Try adding $doc.document.setMetaDataDirty(false) here
$doc.save()
You need to save it with $xwiki.getXWiki().saveDocument($doc.document,
$context.context)
#end
{{/velocity}}
Thank you!
Joanna
-----
Joanna
-- Please consider the environment --
--
Sergiu Dumitriu
http://purl.org/net/sergiu/