From ac608f7b3e4b62f68bd977ed6d217457fc592d0f Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 10 Jan 2013 12:05:03 -0100 Subject: [PATCH 1/2] Keep umbracoDbDSN in the appSettings in the released version to prevent people from deleting it during merge.. it will delete itself after install anyway --- src/Umbraco.Web.UI/web.Template.Release.config | 2 +- src/Umbraco.Web.UI/web.Template.config | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI/web.Template.Release.config b/src/Umbraco.Web.UI/web.Template.Release.config index e68d5b45b1..3a244ea9f6 100644 --- a/src/Umbraco.Web.UI/web.Template.Release.config +++ b/src/Umbraco.Web.UI/web.Template.Release.config @@ -10,7 +10,7 @@ --> - diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index e09956a823..3cdc676ea0 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -32,6 +32,7 @@ + From 6187af76c05b82c3409426e964206d0b3862b687 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 10 Jan 2013 13:55:42 -0100 Subject: [PATCH 2/2] Revert my c1722c82aa28 changes to published version checking (which were wrong!) --- src/Umbraco.Core/Services/ContentService.cs | 2 +- .../umbraco.presentation/umbraco/Trees/BaseContentTree.cs | 2 +- .../umbraco.presentation/umbraco/editContent.aspx.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index bfcb0ec2fe..6eab906f13 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -1189,7 +1189,7 @@ namespace Umbraco.Core.Services if (checkCurrent == false && id == content.Id) continue; //Check if the content for the current id is published - escape the loop if we encounter content that isn't published - var hasPublishedVersion = ApplicationContext.Current.Services.ContentService.GetById(id).Published; + var hasPublishedVersion = HasPublishedVersion(id); if (hasPublishedVersion == false) return false; } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs index 6a86e35fba..aa5e64c9ea 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/BaseContentTree.cs @@ -113,7 +113,7 @@ function openContent(id) { node.OpenIcon = dd.ContentTypeIcon; } - if (dd.Published == false) + if (dd.HasPublishedVersion() == false) node.Style.DimNode(); if (dd.HasPendingChanges()) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs index 5c892ea101..3dc0f1ee7b 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs @@ -382,7 +382,7 @@ namespace umbraco.cms.presentation void UpdateNiceUrls() { - if (!_documentHasPublishedVersion || _document.Published == false) + if (_documentHasPublishedVersion == false) { UpdateNiceUrlProperties("" + ui.Text("content", "itemNotPublished", base.getUser()) + "", null); return;