roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r315060 - in /incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets: CommentServlet.java TrackbackServlet.java
Date Wed, 12 Oct 2005 21:55:12 GMT
Author: snoopdave
Date: Wed Oct 12 14:55:10 2005
New Revision: 315060

URL: http://svn.apache.org/viewcvs?rev=315060&view=rev
Log:
Email notification of comments should work for trackbacks too

Modified:
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/CommentServlet.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/TrackbackServlet.java

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/CommentServlet.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/CommentServlet.java?rev=315060&r1=315059&r2=315060&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/CommentServlet.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/CommentServlet.java
Wed Oct 12 14:55:10 2005
@@ -250,7 +250,7 @@
      *
      * TODO: Make the addressing options configurable on a per-website basis.
      */
-    private void sendEmailNotification(HttpServletRequest request,
+    static void sendEmailNotification(HttpServletRequest request,
                         RollerRequest rreq,
                         WeblogEntryData entry,
                         CommentData cd) 
@@ -445,7 +445,7 @@
      * This is somewhat ridiculous, but avoids duplicating a bunch of logic 
      * in the already messy sendEmailNotification.
      */
-    private void sendMessage(Session session, String from, String[] to, String[] cc, String[]
bcc, String subject,
+    static void sendMessage(Session session, String from, String[] to, String[] cc, String[]
bcc, String subject,
             String msg, boolean isHtml) throws MessagingException {
         if (isHtml)
             MailUtil.sendHTMLMessage(session, from, to, cc, bcc, subject, msg);

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/TrackbackServlet.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/TrackbackServlet.java?rev=315060&r1=315059&r2=315060&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/TrackbackServlet.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/servlets/TrackbackServlet.java
Wed Oct 12 14:55:10 2005
@@ -20,6 +20,7 @@
 import org.roller.model.RollerFactory;
 import org.roller.pojos.WeblogEntryData;
 import org.roller.presentation.RollerRequest;
+import org.roller.presentation.pagecache.PageCacheFilter;
 
 
 /**
@@ -148,6 +149,12 @@
                         // save, commit, send response
                         comment.save();
                         RollerFactory.getRoller().commit();
+                        
+                        // Refresh user's entries in page cache
+                        PageCacheFilter.removeFromCache(req, entry.getWebsite());
+                    
+                        // Send email notifications
+                        CommentServlet.sendEmailNotification(req, rreq, entry, comment);
                         
                         pw.println("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
                         pw.println("<response>");



Mime
View raw message