SgDotNet
Singapore Professional .NET User Group -For Cool Developers

Bug fix: Moderation menu Delete posts

Latest post 08-26-2005 11:30 PM by icelava. 0 replies.
  • 08-26-2005 11:30 PM

    Bug fix: Moderation menu Delete posts

    The ModerationMenu's Delete link for posts Level 2 and above (child post) will now correctly show the Deletepost.aspx link instead of oddly redirecting back to the Forum view doing nothing.

                DeletePost = (HyperLink) skin.FindControl("DeletePost");
                if (null != DeletePost)
                {
                    // Set the text for the hyperlink

                    if (this.Post.PostLevel == 1)
                    {
                        DeletePost.Text = ResourceManager.GetString("ModerationMenu_DeleteThread");
                        DeletePost.NavigateUrl = Globals.GetSiteUrls().ModeratePostDelete(this.Post.PostID, trueRedirect ? Context.Request.RawUrl :  ForumUrls.Instance().Forum(this.Post.SectionID));
                    }
                    else
                    {
                        DeletePost.Text = ResourceManager.GetString("ModerationMenu_DeletePost");
                                        // 26 Aug 2005
                                        // icelava: Why is this condition here?
                                        // It only serves to make the Delete link non-functional, hyperlinking back to the Forum view.
    //                    if(trueRedirect)
    //                        DeletePost.NavigateUrl = Context.Request.RawUrl;
    //                    else

                            DeletePost.NavigateUrl = Globals.GetSiteUrls().ModeratePostDelete(this.Post.PostID, trueRedirect ? Context.Request.RawUrl : Globals.GetSiteUrls().Post(this.Post.ParentID));
                    }
                }


    The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral

Page 1 of 1 (1 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems