#18065: Fixing date handling in Live Writer

Work Item: 18065

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-12-01 12:16:25 -08:00
parent c7ed6013c8
commit b46281ce48
3 changed files with 33 additions and 5 deletions

View File

@@ -51,8 +51,8 @@ namespace Orchard.Core.Feeds.StandardBuilders {
public DateTime? PublishedUtc {
get {
if (_common != null && _common.PublishedUtc != null)
return _common.PublishedUtc;
if (_common != null && _common.CreatedUtc != null)
return _common.CreatedUtc;
return null;
}
}

View File

@@ -62,7 +62,7 @@ namespace Orchard.Core.Feeds.StandardQueries {
var items = _contentManager.Query()
.Where<CommonPartRecord>(x => x.Container == container.Record)
.OrderByDescending(x => x.PublishedUtc)
.OrderByDescending(x => x.CreatedUtc)
.Slice(0, limit);
foreach (var item in items) {