mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge pull request #5833 from mjy78/issue/5829
[Fixes #5829] Cannot delete spam comment when viewing comment details
This commit is contained in:
@@ -120,7 +120,8 @@ namespace Orchard.Comments.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteComment(int commentId) {
|
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).ContentItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CommentsDisabledForCommentedContent(int id) {
|
public bool CommentsDisabledForCommentedContent(int id) {
|
||||||
|
Reference in New Issue
Block a user