[jboss-svn-commits] JBL Code SVN: r11758 - in labs/jbossforums/trunk/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:47:10 EDT 2007


Author: dejp
Date: 2007-05-08 13:47:09 -0400 (Tue, 08 May 2007)
New Revision: 11758

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

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java	2007-05-08 17:46:34 UTC (rev 11757)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java	2007-05-08 17:47:09 UTC (rev 11758)
@@ -1561,6 +1561,8 @@
          {
             throw new ModuleException("forum must not be null");
          }
+         
+         session.save(poster);
 
          ForumWatch forumWatch = new ForumWatchImpl();
          forumWatch.setPoster(poster);
@@ -1653,6 +1655,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/trunk/forums/src/main/org/jboss/portlet/forums/util/NotificationEngine.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/util/NotificationEngine.java	2007-05-08 17:46:34 UTC (rev 11757)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/util/NotificationEngine.java	2007-05-08 17:47:09 UTC (rev 11758)
@@ -65,6 +65,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;
@@ -263,7 +264,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;
@@ -323,7 +324,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