public string MarkCommentAsHam(int commentId) { var comment = new Businesslogic.Comment(commentId); comment.MarkAsHam(); return "true"; }
public string DeleteComment(int commentId) { var comment = new Businesslogic.Comment(commentId); comment.Delete(); return "true"; }
public string MarkCommentAsHam(int commentId) { var comment = new Businesslogic.Comment(commentId); comment.MarkAsHam(); return("true"); }
public string DeleteComment(int commentId) { var comment = new Businesslogic.Comment(commentId); comment.Delete(); return("true"); }
public static string DeleteComment(int commentId) { var currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0; if (User.GetCurrent() != null || Xslt.IsMemberInGroup("admin", currentMember)) { var comment = new Businesslogic.Comment(commentId); comment.Delete(); return "true"; } return "false"; }
public static string MarkCommentAsSpam(int commentId) { var currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0; if (User.GetCurrent() != null || Xslt.IsMemberInGroup("admin", currentMember)) { var comment = new Businesslogic.Comment(commentId); comment.MarkAsSpam(); return("true"); } return("false"); }
public static string EditComment(int commentId, int itemsPerPage) { var currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0; var comment = new Businesslogic.Comment(commentId); if (comment.Editable(currentMember)) { var body = HttpContext.Current.Request["body"]; comment.Body = body; comment.Save(); return Xslt.NiceCommentUrl(comment.TopicId, comment.Id, itemsPerPage); } return ""; }
public static string EditComment(int commentId, int itemsPerPage) { var currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0; var comment = new Businesslogic.Comment(commentId); if (comment.Editable(currentMember)) { var body = HttpContext.Current.Request["body"]; comment.Body = body; comment.Save(); return(Xslt.NiceCommentUrl(comment.TopicId, comment.Id, itemsPerPage)); } return(""); }
public static string MarkCommentAsSpam(int commentId) { if (Utills.IsModerator() == false) return "false"; var comment = new Businesslogic.Comment(commentId); comment.MarkAsSpam(); return "true"; }