Merge pull request #1969 from umbraco/temp-U4-9974
U4-9974 EnablePropertyValueConverter does the opposite
This commit is contained in:
@@ -21,12 +21,9 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
|
||||
public override bool IsConverter(PublishedPropertyType propertyType)
|
||||
{
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinks2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters == false)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinksAlias);
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinksAlias);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.PublishedContent;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
@@ -122,7 +123,14 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
/// </returns>
|
||||
public override bool IsConverter(PublishedPropertyType propertyType)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPicker2Alias);
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPicker2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MediaPickerAlias);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -20,11 +20,11 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MemberPicker2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters == false)
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MemberPickerAlias);
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview)
|
||||
|
||||
@@ -55,11 +55,11 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePicker2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters == false)
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.MultiNodeTreePickerAlias);
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -56,11 +56,11 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
|
||||
if (propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinks2Alias))
|
||||
return true;
|
||||
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters == false)
|
||||
if (UmbracoConfig.For.UmbracoSettings().Content.EnablePropertyValueConverters)
|
||||
{
|
||||
return propertyType.PropertyEditorAlias.Equals(Constants.PropertyEditors.RelatedLinksAlias);
|
||||
}
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user