--------------------------------------------------
From: "Sergiu Dumitriu" <sergiu(a)xwiki.com>
Sent: Friday, December 04, 2009 5:41 PM
To: "XWiki Users" <users(a)xwiki.org>
Subject: Re: [xwiki-users] Page modification date
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
What's this for:
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/
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users