diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs b/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs index 241974453..66656cf3e 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs @@ -82,7 +82,9 @@ namespace Orchard.Comments.Services { comment.Record.UserName = (CurrentUser == null ? context.Author : CurrentUser.UserName); comment.Record.CommentedOn = context.CommentedOn; - comment.Record.Status = _commentValidator.ValidateComment(comment) ? moderateComments ? CommentStatus.Pending : CommentStatus.Approved : CommentStatus.Spam; + comment.Record.Status = _commentValidator.ValidateComment(comment) + ? moderateComments ? CommentStatus.Pending : CommentStatus.Approved + : CommentStatus.Spam; // store id of the next layer for large-grained operations, e.g. rss on blog //TODO:(rpaquay) Get rid of this (comment aspect takes care of container) diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentValidator.cs b/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentValidator.cs index 599ca38a3..c52bc9c96 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentValidator.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentValidator.cs @@ -44,14 +44,14 @@ namespace Orchard.Comments.Services { AkismetComment akismetComment = new AkismetComment { CommentAuthor = commentPart.Record.Author, CommentAuthorEmail = commentPart.Record.Email, - Blog = commentPart.Record.SiteName, + Blog = akismetUrl, CommentAuthorUrl = commentPart.Record.SiteName, CommentContent = commentPart.Record.CommentText, UserAgent = HttpContext.Current.Request.UserAgent, }; if (akismetApi.VerifyKey()) { - return akismetApi.CommentCheck(akismetComment); + return !akismetApi.CommentCheck(akismetComment); // CommentCheck returning true == spam } return false; diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/EditorTemplates/Parts/Comments.SiteSettings.ascx b/src/Orchard.Web/Modules/Orchard.Comments/Views/EditorTemplates/Parts/Comments.SiteSettings.ascx index 812c55af9..8ff823336 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Views/EditorTemplates/Parts/Comments.SiteSettings.ascx +++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/EditorTemplates/Parts/Comments.SiteSettings.ascx @@ -9,16 +9,16 @@