mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
#19832: Fixing spam comments migration
Work Item: 19832 --HG-- branch : 1.x
This commit is contained in:
@@ -132,6 +132,11 @@ namespace Orchard.Comments {
|
||||
// define the default value for positions
|
||||
foreach (var comment in _commentService.GetComments().List()) {
|
||||
comment.Position = comment.Id;
|
||||
|
||||
// migrating the Spam value which is now deprecated
|
||||
if (comment.Status != CommentStatus.Approved) {
|
||||
comment.Status = CommentStatus.Pending;
|
||||
}
|
||||
}
|
||||
|
||||
return 4;
|
||||
|
@@ -1,6 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Orchard.Comments.Models {
|
||||
public enum CommentStatus {
|
||||
Pending,
|
||||
Approved,
|
||||
|
||||
[Obsolete]
|
||||
Spam
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user