#19832: Fixing spam comments migration

Work Item: 19832

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2013-06-26 16:23:32 -07:00
parent 0eab136616
commit 6ed72e3c97
2 changed files with 10 additions and 0 deletions

View File

@@ -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;

View File

@@ -1,6 +1,11 @@
using System;
namespace Orchard.Comments.Models {
public enum CommentStatus {
Pending,
Approved,
[Obsolete]
Spam
}
}