U4-6154 - bugfix

This commit is contained in:
Stephan
2015-01-20 19:57:13 +01:00
parent 12d51b292c
commit 7b4a82eb8d

View File

@@ -1686,7 +1686,9 @@ namespace Umbraco.Core.Services
/// <returns>True if unpublishing succeeded, otherwise False</returns>
private bool UnPublishDo(IContent content, bool omitCacheRefresh = false, int userId = 0)
{
content = GetById(content.Id); // ensure we have the newest version
var newest = GetById(content.Id); // ensure we have the newest version
if (content.Version != newest.Version) // but use the original object if it's already the newest version
content = newest;
var published = content.Published ? content : GetPublishedVersion(content.Id); // get the published version
if (published == null)
return false; // already unpublished