Fixing Blog archives when changing unpublished content's creation date

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2013-05-15 13:13:20 -07:00
parent 1bb374e60b
commit a789485dc5

View File

@@ -24,7 +24,7 @@ namespace Orchard.Blogs.Handlers {
OnVersioning<BlogPostPart>((context, bp1, bp2) => {
var commonPart = bp1.As<CommonPart>();
if(commonPart == null || !commonPart.CreatedUtc.HasValue || !bp1.IsPublished)
if(commonPart == null || !commonPart.CreatedUtc.HasValue || !bp1.IsPublished || !bp2.IsPublished)
return;
_previousCreatedUtc[bp2] = commonPart.CreatedUtc.Value;