Re: [xwiki-devs] [xwiki-notifications] r26311 - in platform/core/trunk/xwiki-core/src/main: java/com/xpn/xwiki/plugin/packaging resources
On Jan 22, 2010, at 7:08 PM, Jerome Velociter wrote:
vmassol (SVN) wrote:
Author: vmassol Date: 2010-01-22 18:49:40 +0100 (Fri, 22 Jan 2010) New Revision: 26311
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/packaging/Package.java platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties Log: XWIKI-4774: Importer should add a version comment when saving documents when importing
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/packaging/Package.java =================================================================== --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/packaging/Package.java 2010-01-22 17:15:11 UTC (rev 26310) +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/plugin/packaging/Package.java 2010-01-22 17:49:40 UTC (rev 26311) @@ -30,6 +30,7 @@ import java.io.OutputStream; import java.io.StringWriter; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -645,7 +646,8 @@ xa.getAttachment_content().setContentDirty(false); }
- context.getWiki().saveDocument(doc.getDoc(), context); + String saveMessage = context.getMessageTool().get("core.importer.saveDocumentComment"); + context.getWiki().saveDocument(doc.getDoc(), saveMessage, context); doc.getDoc().saveAllAttachments(false, true, context); addToInstalled(doc.getFullName() + ":" + doc.getLanguage(), context);
Modified: platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties =================================================================== --- platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties 2010-01-22 17:15:11 UTC (rev 26310) +++ platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties 2010-01-22 17:49:40 UTC (rev 26311) @@ -510,6 +510,7 @@ core.importer.select=select core.importer.selectAll=all core.importer.selectNone=none +core.importer.saveDocumentComment=Imported from XAR
Maybe we could add package name & version, WDYT ?
I thought about it but for now I wanted to do the simplest thing that would work. I'm ok to add package name + version. Thanks -Vincent
Jerome.
registerwelcome=Welcome to the registration form. This will allow you to edit pages, once the admin gives you appropriate rights email=e-Mail address @@ -669,7 +670,10 @@
tempdirnotset=Temporary directory not set. Please follow the instructions on <a href="http://www.xwiki.org/xwiki/bin/view/FAQ/WhyAmIGettingANullPointerExceptionWhenUploadingFiles">xwiki.org</a> on how to fix this.
-# comments for history +# Comments for history +# Note: These keys should be moved to their domains. +# For example the comment messages for the XAR importer are in core.importer.* keys. +# TODO: Do the same for the other keys core.comment=Comment core.comment.prompt=Enter a comment describing your changes core.comment.addComment=Added comment
participants (1)
-
Vincent Massol