From a789485dc5fda2f864e92bff30929b5cbe2a9e58 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Wed, 15 May 2013 13:13:20 -0700 Subject: [PATCH] Fixing Blog archives when changing unpublished content's creation date --HG-- branch : 1.x --- .../Modules/Orchard.Blogs/Handlers/BlogPartArchiveHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPartArchiveHandler.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPartArchiveHandler.cs index 891a9cd3a..d8d2d77bf 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPartArchiveHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Handlers/BlogPartArchiveHandler.cs @@ -24,7 +24,7 @@ namespace Orchard.Blogs.Handlers { OnVersioning((context, bp1, bp2) => { var commonPart = bp1.As(); - if(commonPart == null || !commonPart.CreatedUtc.HasValue || !bp1.IsPublished) + if(commonPart == null || !commonPart.CreatedUtc.HasValue || !bp1.IsPublished || !bp2.IsPublished) return; _previousCreatedUtc[bp2] = commonPart.CreatedUtc.Value;