mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +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
|
// define the default value for positions
|
||||||
foreach (var comment in _commentService.GetComments().List()) {
|
foreach (var comment in _commentService.GetComments().List()) {
|
||||||
comment.Position = comment.Id;
|
comment.Position = comment.Id;
|
||||||
|
|
||||||
|
// migrating the Spam value which is now deprecated
|
||||||
|
if (comment.Status != CommentStatus.Approved) {
|
||||||
|
comment.Status = CommentStatus.Pending;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 4;
|
return 4;
|
||||||
|
@@ -1,6 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
namespace Orchard.Comments.Models {
|
namespace Orchard.Comments.Models {
|
||||||
public enum CommentStatus {
|
public enum CommentStatus {
|
||||||
Pending,
|
Pending,
|
||||||
Approved,
|
Approved,
|
||||||
|
|
||||||
|
[Obsolete]
|
||||||
|
Spam
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user