Exemplo n.º 1
0
        public string MarkCommentAsHam(int commentId)
        {
            var comment = new Businesslogic.Comment(commentId);
            comment.MarkAsHam();

            return "true";
        }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 5
0
        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";
        }
Exemplo n.º 6
0
        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");
        }
Exemplo n.º 7
0
        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 "";
        }
Exemplo n.º 8
0
        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("");
        }
Exemplo n.º 9
0
        public static string MarkCommentAsSpam(int commentId)
        {
            if (Utills.IsModerator() == false)
                return "false";

            var comment = new Businesslogic.Comment(commentId);
            comment.MarkAsSpam();

            return "true";
        }