From e509099cdbfb4fbb88835b6a3806d115155bc18a Mon Sep 17 00:00:00 2001 From: Claus Date: Thu, 7 Jan 2016 13:40:37 +0100 Subject: [PATCH] Setting for enabling inherited documenttypes. --- .../UmbracoSettings/ContentElement.cs | 17 +++++++++++++++++ .../UmbracoSettings/IContentSection.cs | 2 ++ .../config/umbracoSettings.config | 3 +++ src/umbraco.businesslogic/UmbracoSettings.cs | 11 +++++++++++ 4 files changed, 33 insertions(+) diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs index ced63f04bb..077658382f 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ContentElement.cs @@ -280,6 +280,18 @@ namespace Umbraco.Core.Configuration.UmbracoSettings } } + [ConfigurationProperty("EnableInheritedDocumentTypes")] + internal InnerTextConfigurationElement EnableInheritedDocumentTypes + { + get + { + return new OptionalInnerTextConfigurationElement( + (InnerTextConfigurationElement)this["EnableInheritedDocumentTypes"], + //set the default + true); + } + } + string IContentSection.NotificationEmailAddress { get { return Notifications.NotificationEmailAddress; } @@ -414,5 +426,10 @@ namespace Umbraco.Core.Configuration.UmbracoSettings { get { return DefaultDocumentTypeProperty; } } + + bool IContentSection.EnableInheritedDocumentTypes + { + get { return ContinouslyUpdateXmlDiskCache; } + } } } \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs index 93e3260b44..ebdd9ae637 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IContentSection.cs @@ -59,5 +59,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings bool GlobalPreviewStorageEnabled { get; } string DefaultDocumentTypeProperty { get; } + + bool EnableInheritedDocumentTypes { get; } } } \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/umbracoSettings.config b/src/Umbraco.Web.UI/config/umbracoSettings.config index 5a8af019f0..77d31fda09 100644 --- a/src/Umbraco.Web.UI/config/umbracoSettings.config +++ b/src/Umbraco.Web.UI/config/umbracoSettings.config @@ -102,6 +102,9 @@ Textstring + + + true diff --git a/src/umbraco.businesslogic/UmbracoSettings.cs b/src/umbraco.businesslogic/UmbracoSettings.cs index cc821528e2..3d489cfaa4 100644 --- a/src/umbraco.businesslogic/UmbracoSettings.cs +++ b/src/umbraco.businesslogic/UmbracoSettings.cs @@ -609,6 +609,17 @@ namespace umbraco get { return UmbracoConfig.For.UmbracoSettings().Content.DefaultDocumentTypeProperty; } } + /// + /// Enables inherited document types. + /// This feature is not recommended and therefore is not enabled by default in new installations. + /// Inherited document types will not be supported in v8. + /// + //[Obsolete("This will not be supported in v8")] + public static bool EnableInheritedDocumentTypes + { + get { return UmbracoConfig.For.UmbracoSettings().Content.EnableInheritedDocumentTypes; } + } + private static string _path; ///