/// <summary> /// Reject post and all child posts. /// </summary> protected void btnRejectSubTree_Click(object sender, EventArgs e) { if (!CheckPermissions("cms.forums", PERMISSION_MODIFY)) { return; } if (PostInfo != null) { // Reject with sub-posts PostInfo.Reject(true); ltlScript.Text += ScriptHelper.GetScript("parent.frames['posts_tree'].location.href = 'ForumPost_Tree.aspx?postid=" + PostInfo.PostId + "&forumid=" + PostInfo.PostForumID + "';"); ltlScript.Text += ScriptHelper.GetScript("parent.frames['posts_edit'].location.href = 'ForumPost_View.aspx?postid=" + PostID + mListingParameter + "';"); } }
/// <summary> /// This function is executed by callback initiated by 'Approve' button in menu. /// It can be either Approve or Reject. /// </summary> protected void btnApprove_Click(object sender, EventArgs e) { if (!CheckPermissions("cms.forums", PERMISSION_MODIFY)) { return; } // if post is approved if (PostInfo.PostApproved) { //reject post PostInfo.Reject(); } else { PostInfo.Approve(); } ltlScript.Text += ScriptHelper.GetScript("parent.frames['posts_tree'].location.href = 'ForumPost_Tree.aspx?postid=" + PostInfo.PostId + "&forumid=" + PostInfo.PostForumID + "';"); ltlScript.Text += ScriptHelper.GetScript("parent.frames['posts_edit'].location.href = 'ForumPost_View.aspx?postid=" + PostID + mListingParameter + "';"); }