예제 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            // remove the thread from the search index
            ForumThread forumThread = new ForumThread(threadId);

            ForumThread.Delete(threadId);
            Forum.UpdateUserStats(-1); // updates all users

            ForumThreadIndexBuilderProvider.RemoveForumIndexItem(
                moduleId,
                forumThread.ForumId,
                threadId,
                -1);

            SiteUtils.QueueIndexing();

            if (hdnReturnUrl.Value.Length > 0)
            {
                WebUtils.SetupRedirect(this, hdnReturnUrl.Value);
                return;
            }

            WebUtils.SetupRedirect(this, SiteUtils.GetCurrentPageUrl());
        }