protected void OnThreadMoved(ForumThreadMovedArgs e) { if (ThreadMoved != null) { ThreadMoved(this, e); } }
public bool UpdateThread() { bool result = false; result = DBForums.ForumThreadUpdate( this.threadID, this.forumID, this.subject, this.sortOrder, this.isLocked, this.isQuestion, this.includeInSiteMap, this.setNoIndexMeta, this.pageTitleOverride, this.modStatus, this.threadType, this.assignedTo, this.lockedBy, this.lockedReason, this.lockedUtc); if (this.forumID != this.origForumID) { Forum.DecrementThreadCount(this.origForumID); Forum.IncrementThreadCount(this.forumID); ForumThreadMovedArgs e = new ForumThreadMovedArgs(); e.ForumId = forumID; e.OriginalForumId = origForumID; OnThreadMoved(e); Forum.RecalculatePostStats(this.origForumID); Forum.RecalculatePostStats(this.forumID); } return(result); }
public void ThreadMovedHandler(object sender, ForumThreadMovedArgs e) { if (WebConfigSettings.DisableSearchIndex) { return; } ForumThread forumThread = (ForumThread)sender; DataTable postIDList = forumThread.GetPostIdList(); Forum origForum = new Forum(e.OriginalForumId); foreach (DataRow row in postIDList.Rows) { int postID = Convert.ToInt32(row["PostID"]); ForumThread post = new ForumThread(forumThread.ThreadId, postID); RemoveForumIndexItem( origForum.ModuleId, e.OriginalForumId, forumThread.ThreadId, postID); IndexItem(post); } }
public bool UpdateThread() { bool result = false; result = DBForums.ForumThreadUpdate( this.threadID, this.forumID, this.subject, this.sortOrder, this.isLocked, this.isQuestion, this.includeInSiteMap, this.setNoIndexMeta, this.pageTitleOverride, this.modStatus, this.threadType, this.assignedTo, this.lockedBy, this.lockedReason, this.lockedUtc); if (this.forumID != this.origForumID) { Forum.DecrementThreadCount(this.origForumID); Forum.IncrementThreadCount(this.forumID); ForumThreadMovedArgs e = new ForumThreadMovedArgs(); e.ForumId = forumID; e.OriginalForumId = origForumID; OnThreadMoved(e); Forum.RecalculatePostStats(this.origForumID); Forum.RecalculatePostStats(this.forumID); } return result; }