mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Comment service now fetches latest (instead of published) when deleting a comment.
This commit is contained in:
@@ -120,7 +120,8 @@ namespace Orchard.Comments.Services {
|
||||
}
|
||||
|
||||
public void DeleteComment(int commentId) {
|
||||
_orchardServices.ContentManager.Remove(_orchardServices.ContentManager.Get<CommentPart>(commentId).ContentItem);
|
||||
// Get latest because the comment may be unpublished if the anti-spam module has caught it
|
||||
_orchardServices.ContentManager.Remove(_orchardServices.ContentManager.Get<CommentPart>(commentId, VersionOptions.Latest));
|
||||
}
|
||||
|
||||
public bool CommentsDisabledForCommentedContent(int id) {
|
||||
|
Reference in New Issue
Block a user