[jboss-svn-commits] JBL Code SVN: r11757 - in labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums: util and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue May 8 13:46:34 EDT 2007


Author: dejp
Date: 2007-05-08 13:46:34 -0400 (Tue, 08 May 2007)
New Revision: 11757

Modified:
   labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
   labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/util/NotificationEngine.java
Log:
JBFORUMS-212

Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java	2007-05-08 17:46:00 UTC (rev 11756)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java	2007-05-08 17:46:34 UTC (rev 11757)
@@ -1562,12 +1562,14 @@
          {
             throw new ModuleException("poster must not be null");
          }
-
+         
          if (forum == null)
          {
             throw new ModuleException("forum must not be null");
          }
 
+         session.save(poster);
+         
          ForumWatch forumWatch = new ForumWatchImpl();
          forumWatch.setPoster(poster);
          forumWatch.setForum(forum);
@@ -1659,6 +1661,8 @@
             throw new ModuleException("topic must not be null");
          }
 
+         session.save(poster);
+         
          TopicWatch topicWatch = new TopicWatchImpl();
          topicWatch.setPoster(poster);
          topicWatch.setTopic(topic);

Modified: labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/util/NotificationEngine.java
===================================================================
--- labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/util/NotificationEngine.java	2007-05-08 17:46:00 UTC (rev 11756)
+++ labs/jbossforums/branches/forums26/forums/src/main/org/jboss/portlet/forums/util/NotificationEngine.java	2007-05-08 17:46:34 UTC (rev 11757)
@@ -67,6 +67,7 @@
 import org.jboss.portlet.forums.model.TopicWatch;
 import org.jboss.portlet.forums.model.Watch;
 import org.jboss.portlet.forums.ui.Constants;
+import org.jboss.portlet.forums.ui.PortalUtil;
 
 import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
 import EDU.oswego.cs.dl.util.concurrent.QueuedExecutor;
@@ -271,7 +272,7 @@
                   User watcher = watch.getPoster().getUser();
                   Object watcherId = watcher.getId();
                   
-                  if (!notifieds.contains(watcherId))
+                  if (!notifieds.contains(watcherId) && !watcherId.equals(PortalUtil.getUserNA().getId()))
                   {
                      
                      boolean securityFlag = true;
@@ -331,7 +332,7 @@
                       TopicWatch watch = (TopicWatch)i.next();
                       User watcher = watch.getPoster().getUser();
                       Object watcherId = watcher.getId();
-                      if (!notifieds.contains(watcherId))
+                      if (!notifieds.contains(watcherId) && !watcherId.equals(PortalUtil.getUserNA().getId()))
                       {
                           boolean securityFlag = true;
                           




More information about the jboss-svn-commits mailing list