From 47a9f0a0dcb62a97b6c12486fabe9d672133aecd Mon Sep 17 00:00:00 2001 From: pb Date: Thu, 14 Feb 2008 23:57:34 +0000 Subject: [PATCH] ------------------------------------------------------------------------ r1616 | chrisg23 | 2007-09-13 12:45:39 +0200 (Do, 13 Sep 2007) | 1 line Sourceforge patch 1793122 - enable forum subscription notifications to be deleted if successfully sent, in order to prevent the nt_requests table getting too big. No effect until the new version of forum, which includes a config parameter to enable deletion of notifications, makes it into trunk (shortly) ------------------------------------------------------------------------ git-svn-id: https://svn.libreccm.org/ccm/trunk@2 8810af33-2d31-482b-a856-94f89814c4df --- .../src/com/arsdigita/notification/BaseSubscription.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ccm-core/src/com/arsdigita/notification/BaseSubscription.java b/ccm-core/src/com/arsdigita/notification/BaseSubscription.java index 342e01a17..9452bc20f 100755 --- a/ccm-core/src/com/arsdigita/notification/BaseSubscription.java +++ b/ccm-core/src/com/arsdigita/notification/BaseSubscription.java @@ -148,6 +148,10 @@ public abstract class BaseSubscription extends ACSObject { * should override one or more of these methods. */ public void sendNotification(ThreadedMessage post) { + sendNotification(post, false); + } + + public void sendNotification(ThreadedMessage post, boolean deleteNotification) { if (s_log.isDebugEnabled()) { s_log.debug("Sending nofication to: " + getGroup().getName()); } @@ -156,9 +160,12 @@ public abstract class BaseSubscription extends ACSObject { note.setExpandGroup(new Boolean(true)); note.setHeader(getHeader(post)); note.setSignature(getSignature(post)); + // make sure we don't delete the post itself!!! + note.setMessageDelete(Boolean.FALSE); + note.setIsPermanent(new Boolean(!deleteNotification)); note.save(); - } + } /** * Returns a header for forum alerts with the following standard * information: