Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java,v diff -u -r1.57 -r1.58 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java 22 Jun 2006 07:15:54 -0000 1.57 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java 2 Aug 2006 02:46:17 -0000 1.58 @@ -549,13 +549,19 @@ Forum toContent = Forum.newInstance(fromContent,toContentId,forumToolContentHandler); forumDao.saveOrUpdate(toContent); - //save topics in this forum + //save topics in this forum, only save the author created topic!!! and reset its reply number to zero. Set topics = toContent.getMessages(); if(topics != null){ Iterator iter = topics.iterator(); while(iter.hasNext()){ Message msg = (Message) iter.next(); //set this message forum Uid as toContent + if(!msg.getIsAuthored()) + continue; + msg.setReplyNumber(0); + msg.setCreated(new Date()); + msg.setLastReplyDate(new Date()); + msg.setHideFlag(false); msg.setForum(toContent); createRootTopic(toContent.getUid(),null,msg); }