------------------------------------------------------------------------

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
master
pb 2008-02-14 23:57:34 +00:00
parent 8865d45011
commit 47a9f0a0dc
1 changed files with 8 additions and 1 deletions

View File

@ -148,6 +148,10 @@ public abstract class BaseSubscription extends ACSObject {
* should override one or more of these methods. * should override one or more of these methods.
*/ */
public void sendNotification(ThreadedMessage post) { public void sendNotification(ThreadedMessage post) {
sendNotification(post, false);
}
public void sendNotification(ThreadedMessage post, boolean deleteNotification) {
if (s_log.isDebugEnabled()) { if (s_log.isDebugEnabled()) {
s_log.debug("Sending nofication to: " + getGroup().getName()); s_log.debug("Sending nofication to: " + getGroup().getName());
} }
@ -156,9 +160,12 @@ public abstract class BaseSubscription extends ACSObject {
note.setExpandGroup(new Boolean(true)); note.setExpandGroup(new Boolean(true));
note.setHeader(getHeader(post)); note.setHeader(getHeader(post));
note.setSignature(getSignature(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(); note.save();
}
}
/** /**
* Returns a header for forum alerts with the following standard * Returns a header for forum alerts with the following standard
* information: * information: