Merge remote-tracking branch 'origin/dev-v7.8' into dev-v7.9

This commit is contained in:
Sebastiaan Jansssen
2018-02-26 16:26:54 +01:00
2 changed files with 10 additions and 5 deletions

View File

@@ -48,8 +48,10 @@ namespace Umbraco.Core.PropertyEditors
private static List<PropertyEditor> SanitizeNames(List<PropertyEditor> editors)
{
var nestedContentEditorFromPackage = editors.FirstOrDefault(x => x.Alias == "Our.Umbraco.NestedContent");
if (nestedContentEditorFromPackage != null)
if (nestedContentEditorFromPackage != null) {
nestedContentEditorFromPackage.Name = "(Obsolete) " + nestedContentEditorFromPackage.Name;
nestedContentEditorFromPackage.IsDeprecated = true;
}
return editors;
}
@@ -74,4 +76,4 @@ namespace Umbraco.Core.PropertyEditors
return PropertyEditors.SingleOrDefault(x => x.Alias == alias);
}
}
}
}

View File

@@ -20,6 +20,7 @@ using umbraco;
using Constants = Umbraco.Core.Constants;
using System.Net.Http;
using System.Text;
using Umbraco.Core.Configuration;
namespace Umbraco.Web.Editors
{
@@ -340,9 +341,11 @@ namespace Umbraco.Web.Editors
Constants.Applications.Settings, Constants.Applications.Developer)]
public IDictionary<string, IEnumerable<DataTypeBasic>> GetGroupedPropertyEditors()
{
var datatypes = new List<DataTypeBasic>();
var datatypes = new List<DataTypeBasic>();
var showDeprecatedPropertyEditors = UmbracoConfig.For.UmbracoSettings().Content
.ShowDeprecatedPropertyEditors;
var propertyEditors = PropertyEditorResolver.Current.PropertyEditors;
var propertyEditors = PropertyEditorResolver.Current.PropertyEditors.Where(x=>x.IsDeprecated == false || showDeprecatedPropertyEditors);
foreach (var propertyEditor in propertyEditors)
{
var hasPrevalues = propertyEditor.PreValueEditor.Fields.Any();
@@ -377,4 +380,4 @@ namespace Umbraco.Web.Editors
}
#endregion
}
}
}