[jboss-svn-commits] JBL Code SVN: r6385 - labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Sep 23 16:11:03 EDT 2006


Author: unibrew
Date: 2006-09-23 16:11:01 -0400 (Sat, 23 Sep 2006)
New Revision: 6385

Modified:
   labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java
Log:
[JBFORUMS-] Enabling topic views count.

Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java	2006-09-23 19:54:09 UTC (rev 6384)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java	2006-09-23 20:11:01 UTC (rev 6385)
@@ -190,12 +190,13 @@
         String page = ForumUtil.getParameter(Constants.p_page);
         if (t != null && t.trim().length() > 0) {
             topicId = Integer.parseInt(t);
-        }
+        }        
 
         //process the topic information
         if (topicId != -1) {
             this.topic =
                     BaseController.getForumsModule().findTopicById(new Integer(topicId));
+            topic.setViewCount(topic.getViewCount()+1);
             Collection posts = this.topic.getPosts();
             if (this.userPreferences.getPreference(Constants.POST_ORDER_KEY).compareToIgnoreCase("ascending")==0) {
                 posts = this.getForumsModule().findPostsByTopicIdAsc(topic.getId(),0,Integer.MAX_VALUE);




More information about the jboss-svn-commits mailing list