Author: vmassol
Date: 2007-09-12 18:19:09 +0200 (Wed, 12 Sep 2007)
New Revision: 4881
Modified:
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/XWiki.java
Log:
XWIKI-1739: Document change notification not sent for new documents
Patch submitted by Raffaello
Reviewed by Vincent Massol
Merged from trunk (rev 4880)
Modified:
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/XWiki.java
===================================================================
---
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/XWiki.java
2007-09-12 16:10:22 UTC (rev 4880)
+++
xwiki-platform/core/branches/xwiki-core-1.1/src/main/java/com/xpn/xwiki/XWiki.java
2007-09-12 16:19:09 UTC (rev 4881)
@@ -950,10 +950,14 @@
// Setting comment before saving
doc.setComment((comment == null) ? "" : comment);
+ // We need to save the original document since saveXWikiDoc() will
reset it and we
+ // need that original document for the notification below.
+ XWikiDocument originalDocument = doc.getOriginalDocument();
+
getStore().saveXWikiDoc(doc, context);
// Notify listeners about the document change
- getNotificationManager().verify(doc, doc.getOriginalDocument(),
+ getNotificationManager().verify(doc, originalDocument,
XWikiDocChangeNotificationInterface.EVENT_CHANGE, context);
} finally {
if ((server != null) && (database != null)) {
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications