4 Dec
2009
4 Dec
'09
9:41 a.m.
On 12/04/2009 09:52 AM, J. Allen Q. Santos wrote:
Hi,
I was just wondering, is it possible to manually change the modification date (Page.setModified()) of pages in XWiki?
Yes. From Java, you have to do this: doc.setDate(new Date()); // or any Date object you want doc.setContentDirty(false); doc.setMetaDataDirty(false); xwiki.saveDocument(doc, comment, minorEdit, xcontext); From Velocity, you would need programming rights to access the protected XWikiDocument object, since all these setters are not available from the public API. -- Sergiu Dumitriu http://purl.org/net/sergiu/