diff --git a/src/Umbraco.Web/PropertyEditors/CheckBoxListPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/CheckBoxListPropertyEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/CheckBoxListPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/CheckBoxListPropertyEditor.cs index 5791b3d05a..67f3dd61cd 100644 --- a/src/Umbraco.Web/PropertyEditors/CheckBoxListPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/CheckBoxListPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/ColorPickerConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/ColorPickerConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ColorPickerConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/ColorPickerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerPropertyEditor.cs similarity index 97% rename from src/Umbraco.Web/PropertyEditors/ColorPickerPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ColorPickerPropertyEditor.cs index 0b7da0054f..0f6996ddd4 100644 --- a/src/Umbraco.Web/PropertyEditors/ColorPickerPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/ContentPickerConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerConfiguration.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/ContentPickerConfiguration.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ContentPickerConfiguration.cs diff --git a/src/Umbraco.Web/PropertyEditors/ContentPickerConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/ContentPickerConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ContentPickerConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerPropertyEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ContentPickerPropertyEditor.cs index 77c74b288c..4c996fd4fc 100644 --- a/src/Umbraco.Web/PropertyEditors/ContentPickerPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerPropertyEditor.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Models.Editors; diff --git a/src/Umbraco.Web/PropertyEditors/DateTimeConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DateTimeConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/DateTimeConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/DateTimeConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/DateTimePropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/DateTimePropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditor.cs index 6656efcabc..d2a08c3a2b 100644 --- a/src/Umbraco.Web/PropertyEditors/DateTimePropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/DateTimeValidator.cs b/src/Umbraco.Infrastructure/PropertyEditors/DateTimeValidator.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/DateTimeValidator.cs rename to src/Umbraco.Infrastructure/PropertyEditors/DateTimeValidator.cs index 1000922b36..a94edb99bd 100644 --- a/src/Umbraco.Web/PropertyEditors/DateTimeValidator.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DateTimeValidator.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; using Umbraco.Core; +using Umbraco.Core.PropertyEditors; namespace Umbraco.Web.PropertyEditors { diff --git a/src/Umbraco.Web/PropertyEditors/DateValueEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DateValueEditor.cs similarity index 97% rename from src/Umbraco.Web/PropertyEditors/DateValueEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/DateValueEditor.cs index 3fdb95c757..8973dd812b 100644 --- a/src/Umbraco.Web/PropertyEditors/DateValueEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DateValueEditor.cs @@ -1,6 +1,5 @@ using System; using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.Models; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Services; diff --git a/src/Umbraco.Web/PropertyEditors/DecimalConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DecimalConfigurationEditor.cs similarity index 99% rename from src/Umbraco.Web/PropertyEditors/DecimalConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/DecimalConfigurationEditor.cs index 22b1123b7c..952e3557dd 100644 --- a/src/Umbraco.Web/PropertyEditors/DecimalConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DecimalConfigurationEditor.cs @@ -35,4 +35,4 @@ namespace Umbraco.Web.PropertyEditors }); } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/PropertyEditors/DecimalPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DecimalPropertyEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/DecimalPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/DecimalPropertyEditor.cs index e2f4a69f2c..e5ca56878f 100644 --- a/src/Umbraco.Web/PropertyEditors/DecimalPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DecimalPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; using Umbraco.Core.PropertyEditors.Validators; diff --git a/src/Umbraco.Web/PropertyEditors/DropDownFlexibleConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexibleConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/DropDownFlexibleConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexibleConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/DropDownFlexiblePropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexiblePropertyEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/DropDownFlexiblePropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexiblePropertyEditor.cs index 897ca63afc..73ce726257 100644 --- a/src/Umbraco.Web/PropertyEditors/DropDownFlexiblePropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexiblePropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/EmailAddressConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressConfiguration.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/EmailAddressConfiguration.cs rename to src/Umbraco.Infrastructure/PropertyEditors/EmailAddressConfiguration.cs diff --git a/src/Umbraco.Web/PropertyEditors/EmailAddressConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/EmailAddressConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/EmailAddressConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/EmailAddressPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressPropertyEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/EmailAddressPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/EmailAddressPropertyEditor.cs index 675febf9c5..c5bcaf0f86 100644 --- a/src/Umbraco.Web/PropertyEditors/EmailAddressPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs similarity index 96% rename from src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs index 308e03ce3e..715d4b0d36 100644 --- a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; using Umbraco.Core.Logging; @@ -28,8 +27,9 @@ namespace Umbraco.Web.PropertyEditors private readonly IDataTypeService _dataTypeService; private readonly ILocalizationService _localizationService; private readonly ILocalizedTextService _localizedTextService; + private readonly IUmbracoSettingsSection _umbracoSettingsSection; - public FileUploadPropertyEditor(ILogger logger, IMediaFileSystem mediaFileSystem, IContentSection contentSection, IDataTypeService dataTypeService, ILocalizationService localizationService, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper) + public FileUploadPropertyEditor(ILogger logger, IMediaFileSystem mediaFileSystem, IContentSection contentSection, IDataTypeService dataTypeService, ILocalizationService localizationService, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, IUmbracoSettingsSection umbracoSettingsSection) : base(logger, dataTypeService, localizationService, localizedTextService, shortStringHelper) { _mediaFileSystem = mediaFileSystem ?? throw new ArgumentNullException(nameof(mediaFileSystem)); @@ -38,6 +38,7 @@ namespace Umbraco.Web.PropertyEditors _localizationService = localizationService; _localizedTextService = localizedTextService; _uploadAutoFillProperties = new UploadAutoFillProperties(_mediaFileSystem, logger, contentSection); + _umbracoSettingsSection = umbracoSettingsSection; } /// @@ -46,8 +47,8 @@ namespace Umbraco.Web.PropertyEditors /// The corresponding property value editor. protected override IDataValueEditor CreateValueEditor() { - var editor = new FileUploadPropertyValueEditor(Attribute, _mediaFileSystem, _dataTypeService, _localizationService, _localizedTextService, ShortStringHelper); - editor.Validators.Add(new UploadFileTypeValidator(_localizedTextService)); + var editor = new FileUploadPropertyValueEditor(Attribute, _mediaFileSystem, _dataTypeService, _localizationService, _localizedTextService, ShortStringHelper, _umbracoSettingsSection); + editor.Validators.Add(new UploadFileTypeValidator(_localizedTextService, _umbracoSettingsSection)); return editor; } diff --git a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyValueEditor.cs similarity index 94% rename from src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyValueEditor.cs index 22b377b01f..97b5ef20f5 100644 --- a/src/Umbraco.Web/PropertyEditors/FileUploadPropertyValueEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyValueEditor.cs @@ -1,7 +1,7 @@ using System; using System.IO; using Umbraco.Core; -using Umbraco.Web.Composing; +using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; using Umbraco.Core.Models.Editors; using Umbraco.Core.PropertyEditors; @@ -16,11 +16,13 @@ namespace Umbraco.Web.PropertyEditors internal class FileUploadPropertyValueEditor : DataValueEditor { private readonly IMediaFileSystem _mediaFileSystem; + private readonly IUmbracoSettingsSection _umbracoSettingsSection; - public FileUploadPropertyValueEditor(DataEditorAttribute attribute, IMediaFileSystem mediaFileSystem, IDataTypeService dataTypeService, ILocalizationService localizationService, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper) + public FileUploadPropertyValueEditor(DataEditorAttribute attribute, IMediaFileSystem mediaFileSystem, IDataTypeService dataTypeService, ILocalizationService localizationService, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, IUmbracoSettingsSection umbracoSettingsSection) : base(dataTypeService, localizationService, localizedTextService, shortStringHelper, attribute) { _mediaFileSystem = mediaFileSystem ?? throw new ArgumentNullException(nameof(mediaFileSystem)); + _umbracoSettingsSection = umbracoSettingsSection ?? throw new ArgumentNullException(nameof(umbracoSettingsSection)); } /// @@ -99,7 +101,7 @@ namespace Umbraco.Web.PropertyEditors { // process the file // no file, invalid file, reject change - if (UploadFileTypeValidator.IsValidFileExtension(file.FileName) == false) + if (UploadFileTypeValidator.IsValidFileExtension(file.FileName, _umbracoSettingsSection) == false) return null; // get the filepath diff --git a/src/Umbraco.Web/PropertyEditors/GridConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/GridConfiguration.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/GridConfiguration.cs rename to src/Umbraco.Infrastructure/PropertyEditors/GridConfiguration.cs diff --git a/src/Umbraco.Web/PropertyEditors/GridConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/GridConfigurationEditor.cs similarity index 97% rename from src/Umbraco.Web/PropertyEditors/GridConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/GridConfigurationEditor.cs index 8a275b69cd..f9ff1ad0c4 100644 --- a/src/Umbraco.Web/PropertyEditors/GridConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/GridConfigurationEditor.cs @@ -4,7 +4,6 @@ using System.Linq; using Newtonsoft.Json; using Umbraco.Core.IO; using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; namespace Umbraco.Web.PropertyEditors { diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/ImageCropperConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs similarity index 96% rename from src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs index 40be6637a1..66a1ae68ef 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs @@ -1,17 +1,14 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; +using System; using System.Collections.Generic; using System.Linq; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Umbraco.Core; -using Umbraco.Core.Composing; using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; using Umbraco.Core.Logging; -using Umbraco.Core.Media; using Umbraco.Core.Models; using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; using Umbraco.Core.Services; using Umbraco.Core.Strings; using Umbraco.Web.Media; @@ -36,12 +33,13 @@ namespace Umbraco.Web.PropertyEditors private readonly IDataTypeService _dataTypeService; private readonly ILocalizationService _localizationService; private readonly IIOHelper _ioHelper; + private readonly IUmbracoSettingsSection _umbracoSettingsSection; private readonly UploadAutoFillProperties _autoFillProperties; /// /// Initializes a new instance of the class. /// - public ImageCropperPropertyEditor(ILogger logger, IMediaFileSystem mediaFileSystem, IContentSection contentSettings, IDataTypeService dataTypeService, ILocalizationService localizationService, IIOHelper ioHelper, IShortStringHelper shortStringHelper, ILocalizedTextService localizedTextService) + public ImageCropperPropertyEditor(ILogger logger, IMediaFileSystem mediaFileSystem, IContentSection contentSettings, IDataTypeService dataTypeService, ILocalizationService localizationService, IIOHelper ioHelper, IShortStringHelper shortStringHelper, ILocalizedTextService localizedTextService, IUmbracoSettingsSection umbracoSettingsSection) : base(logger, dataTypeService, localizationService, localizedTextService,shortStringHelper) { _mediaFileSystem = mediaFileSystem ?? throw new ArgumentNullException(nameof(mediaFileSystem)); @@ -49,6 +47,7 @@ namespace Umbraco.Web.PropertyEditors _dataTypeService = dataTypeService; _localizationService = localizationService; _ioHelper = ioHelper; + _umbracoSettingsSection = umbracoSettingsSection ?? throw new ArgumentNullException(nameof(umbracoSettingsSection)); // TODO: inject? _autoFillProperties = new UploadAutoFillProperties(_mediaFileSystem, logger, _contentSettings); @@ -60,7 +59,7 @@ namespace Umbraco.Web.PropertyEditors /// Creates the corresponding property value editor. /// /// The corresponding property value editor. - protected override IDataValueEditor CreateValueEditor() => new ImageCropperPropertyValueEditor(Attribute, Logger, _mediaFileSystem, DataTypeService, LocalizationService, LocalizedTextService, ShortStringHelper); + protected override IDataValueEditor CreateValueEditor() => new ImageCropperPropertyValueEditor(Attribute, Logger, _mediaFileSystem, DataTypeService, LocalizationService, LocalizedTextService, ShortStringHelper, _umbracoSettingsSection); /// /// Creates the corresponding preValue editor. diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs similarity index 95% rename from src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs index 1afad2e9e7..9919dda47d 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs @@ -1,8 +1,8 @@ -using Newtonsoft.Json.Linq; -using System; +using System; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Umbraco.Core; -using Umbraco.Web.Composing; +using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Models; @@ -22,12 +22,14 @@ namespace Umbraco.Web.PropertyEditors { private readonly ILogger _logger; private readonly IMediaFileSystem _mediaFileSystem; + private readonly IUmbracoSettingsSection _umbracoSettingsSection; - public ImageCropperPropertyValueEditor(DataEditorAttribute attribute, ILogger logger, IMediaFileSystem mediaFileSystem, IDataTypeService dataTypeService, ILocalizationService localizationService, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper) + public ImageCropperPropertyValueEditor(DataEditorAttribute attribute, ILogger logger, IMediaFileSystem mediaFileSystem, IDataTypeService dataTypeService, ILocalizationService localizationService, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, IUmbracoSettingsSection umbracoSettingsSection) : base(dataTypeService, localizationService, localizedTextService, shortStringHelper, attribute) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _mediaFileSystem = mediaFileSystem ?? throw new ArgumentNullException(nameof(mediaFileSystem)); + _umbracoSettingsSection = umbracoSettingsSection ?? throw new ArgumentNullException(nameof(umbracoSettingsSection)); } /// @@ -144,7 +146,7 @@ namespace Umbraco.Web.PropertyEditors { // process the file // no file, invalid file, reject change - if (UploadFileTypeValidator.IsValidFileExtension(file.FileName) == false) + if (UploadFileTypeValidator.IsValidFileExtension(file.FileName, _umbracoSettingsSection) == false) return null; // get the filepath diff --git a/src/Umbraco.Web/PropertyEditors/IntegerConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/IntegerConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/IntegerConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/IntegerConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/IntegerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/IntegerPropertyEditor.cs similarity index 97% rename from src/Umbraco.Web/PropertyEditors/IntegerPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/IntegerPropertyEditor.cs index 4e54200d5e..49e49e005a 100644 --- a/src/Umbraco.Web/PropertyEditors/IntegerPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/IntegerPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; using Umbraco.Core.PropertyEditors.Validators; diff --git a/src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/ListViewConfiguration.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/ListViewConfiguration.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ListViewConfiguration.cs diff --git a/src/Umbraco.Web/PropertyEditors/ListViewConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ListViewConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/ListViewConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ListViewConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ListViewPropertyEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ListViewPropertyEditor.cs index 9dbd51be66..f46743f0cc 100644 --- a/src/Umbraco.Web/PropertyEditors/ListViewPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ListViewPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/MarkdownConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/MarkdownConfiguration.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/MarkdownConfiguration.cs rename to src/Umbraco.Infrastructure/PropertyEditors/MarkdownConfiguration.cs diff --git a/src/Umbraco.Web/PropertyEditors/MarkdownConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MarkdownConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/MarkdownConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/MarkdownConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/MarkdownPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MarkdownPropertyEditor.cs similarity index 97% rename from src/Umbraco.Web/PropertyEditors/MarkdownPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/MarkdownPropertyEditor.cs index b875670023..167b05df53 100644 --- a/src/Umbraco.Web/PropertyEditors/MarkdownPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MarkdownPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/MultipleValueEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultipleValueEditor.cs similarity index 85% rename from src/Umbraco.Web/PropertyEditors/MultipleValueEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/MultipleValueEditor.cs index 392b4e890a..40525bff79 100644 --- a/src/Umbraco.Web/PropertyEditors/MultipleValueEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MultipleValueEditor.cs @@ -2,7 +2,6 @@ using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.PropertyEditors; @@ -17,12 +16,12 @@ namespace Umbraco.Web.PropertyEditors /// /// This is re-used by editors such as the multiple drop down list or check box list /// - internal class MultipleValueEditor : DataValueEditor + public class MultipleValueEditor : DataValueEditor { private readonly ILogger _logger; - internal MultipleValueEditor(ILogger logger, IDataTypeService dataTypeService, ILocalizationService localizationService, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, DataEditorAttribute attribute) - : base(dataTypeService, localizationService, localizedTextService,shortStringHelper, attribute) + public MultipleValueEditor(ILogger logger, IDataTypeService dataTypeService, ILocalizationService localizationService, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, DataEditorAttribute attribute) + : base(dataTypeService, localizationService, localizedTextService, shortStringHelper, attribute) { _logger = logger; } diff --git a/src/Umbraco.Web/PropertyEditors/PropertyEditorsComponent.cs b/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComponent.cs similarity index 97% rename from src/Umbraco.Web/PropertyEditors/PropertyEditorsComponent.cs rename to src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComponent.cs index df603d9e88..de071d1a1e 100644 --- a/src/Umbraco.Web/PropertyEditors/PropertyEditorsComponent.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComponent.cs @@ -6,7 +6,7 @@ using Umbraco.Core.Services.Implement; namespace Umbraco.Web.PropertyEditors { - internal sealed class PropertyEditorsComponent : IComponent + public sealed class PropertyEditorsComponent : IComponent { private readonly PropertyEditorCollection _propertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/TagConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TagConfigurationEditor.cs similarity index 97% rename from src/Umbraco.Web/PropertyEditors/TagConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TagConfigurationEditor.cs index aed32f10a1..3877611a68 100644 --- a/src/Umbraco.Web/PropertyEditors/TagConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TagConfigurationEditor.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; using Umbraco.Core.IO; using Umbraco.Core.Models; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/TagsPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs similarity index 99% rename from src/Umbraco.Web/PropertyEditors/TagsPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs index a80723e340..7fccd3a15f 100644 --- a/src/Umbraco.Web/PropertyEditors/TagsPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs @@ -4,7 +4,6 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using Newtonsoft.Json.Linq; using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Models.Editors; diff --git a/src/Umbraco.Web/PropertyEditors/TextAreaConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextAreaConfiguration.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/TextAreaConfiguration.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TextAreaConfiguration.cs diff --git a/src/Umbraco.Web/PropertyEditors/TextAreaConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextAreaConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/TextAreaConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TextAreaConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextAreaPropertyEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TextAreaPropertyEditor.cs index c91788b99b..dd3c1fd350 100644 --- a/src/Umbraco.Web/PropertyEditors/TextAreaPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TextAreaPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/TextOnlyValueEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextOnlyValueEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/TextOnlyValueEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TextOnlyValueEditor.cs index e9389779fd..e53c673986 100644 --- a/src/Umbraco.Web/PropertyEditors/TextOnlyValueEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TextOnlyValueEditor.cs @@ -1,5 +1,4 @@ using System; -using Umbraco.Core.Composing; using Umbraco.Core.Models; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Services; diff --git a/src/Umbraco.Web/PropertyEditors/TextboxConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextboxConfiguration.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/TextboxConfiguration.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TextboxConfiguration.cs diff --git a/src/Umbraco.Web/PropertyEditors/TextboxConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextboxConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/TextboxConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TextboxConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextboxPropertyEditor.cs similarity index 98% rename from src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TextboxPropertyEditor.cs index 79d42f19d4..b89f5e228a 100644 --- a/src/Umbraco.Web/PropertyEditors/TextboxPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TextboxPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/TrueFalseConfiguration.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/TrueFalseConfiguration.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TrueFalseConfiguration.cs diff --git a/src/Umbraco.Web/PropertyEditors/TrueFalseConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TrueFalseConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/TrueFalseConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TrueFalseConfigurationEditor.cs diff --git a/src/Umbraco.Web/PropertyEditors/TrueFalsePropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TrueFalsePropertyEditor.cs similarity index 97% rename from src/Umbraco.Web/PropertyEditors/TrueFalsePropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/TrueFalsePropertyEditor.cs index 3c98b61292..3d82dc2809 100644 --- a/src/Umbraco.Web/PropertyEditors/TrueFalsePropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TrueFalsePropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Core.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/UploadFileTypeValidator.cs b/src/Umbraco.Infrastructure/PropertyEditors/UploadFileTypeValidator.cs similarity index 80% rename from src/Umbraco.Web/PropertyEditors/UploadFileTypeValidator.cs rename to src/Umbraco.Infrastructure/PropertyEditors/UploadFileTypeValidator.cs index 39c2c0a2f6..7168ce194a 100644 --- a/src/Umbraco.Web/PropertyEditors/UploadFileTypeValidator.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/UploadFileTypeValidator.cs @@ -4,21 +4,24 @@ using System.ComponentModel.DataAnnotations; using System.IO; using System.Linq; using Newtonsoft.Json.Linq; +using Umbraco.Composing; using Umbraco.Core; -using Umbraco.Core.Services; -using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Configuration; using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Web.Composing; +using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Services; namespace Umbraco.Web.PropertyEditors { internal class UploadFileTypeValidator : IValueValidator { private readonly ILocalizedTextService _localizedTextService; + private readonly IUmbracoSettingsSection _umbracoSettingsSection; - public UploadFileTypeValidator(ILocalizedTextService localizedTextService) + public UploadFileTypeValidator(ILocalizedTextService localizedTextService, IUmbracoSettingsSection umbracoSettingsSection) { _localizedTextService = localizedTextService; + _umbracoSettingsSection = umbracoSettingsSection; } public IEnumerable Validate(object value, string valueType, object dataTypeConfiguration) @@ -43,7 +46,7 @@ namespace Umbraco.Web.PropertyEditors foreach (string filename in fileNames) { - if (IsValidFileExtension(filename) == false) + if (IsValidFileExtension(filename, _umbracoSettingsSection) == false) { //we only store a single value for this editor so the 'member' or 'field' // we'll associate this error with will simply be called 'value' @@ -52,11 +55,11 @@ namespace Umbraco.Web.PropertyEditors } } - internal static bool IsValidFileExtension(string fileName) + internal static bool IsValidFileExtension(string fileName, IUmbracoSettingsSection umbracoSettingsSection) { if (fileName.IndexOf('.') <= 0) return false; var extension = new FileInfo(fileName).Extension.TrimStart("."); - return Current.Configs.Settings().Content.IsFileAllowedForUpload(extension); + return umbracoSettingsSection.Content.IsFileAllowedForUpload(extension); } } } diff --git a/src/Umbraco.Web/PropertyEditors/UserPickerConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/UserPickerConfiguration.cs similarity index 99% rename from src/Umbraco.Web/PropertyEditors/UserPickerConfiguration.cs rename to src/Umbraco.Infrastructure/PropertyEditors/UserPickerConfiguration.cs index f7bd0ceb7d..4d497867a1 100644 --- a/src/Umbraco.Web/PropertyEditors/UserPickerConfiguration.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/UserPickerConfiguration.cs @@ -10,4 +10,4 @@ namespace Umbraco.Web.PropertyEditors {"entityType", "User"} }; } -} \ No newline at end of file +} diff --git a/src/Umbraco.Web/PropertyEditors/UserPickerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/UserPickerPropertyEditor.cs similarity index 97% rename from src/Umbraco.Web/PropertyEditors/UserPickerPropertyEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/UserPickerPropertyEditor.cs index 30568de0ea..429527f3eb 100644 --- a/src/Umbraco.Web/PropertyEditors/UserPickerPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/UserPickerPropertyEditor.cs @@ -1,5 +1,4 @@ using Umbraco.Core; -using Umbraco.Web.Composing; using Umbraco.Core.Logging; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Services; diff --git a/src/Umbraco.Web/PropertyEditors/ValueListConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueListConfigurationEditor.cs similarity index 100% rename from src/Umbraco.Web/PropertyEditors/ValueListConfigurationEditor.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ValueListConfigurationEditor.cs index 6facc69f40..7802767ad6 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueListConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueListConfigurationEditor.cs @@ -2,8 +2,8 @@ using System.Linq; using Newtonsoft.Json.Linq; using Umbraco.Core.IO; -using Umbraco.Core.Services; using Umbraco.Core.PropertyEditors; +using Umbraco.Core.Services; namespace Umbraco.Web.PropertyEditors { diff --git a/src/Umbraco.Web/PropertyEditors/ValueListUniqueValueValidator.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueListUniqueValueValidator.cs similarity index 94% rename from src/Umbraco.Web/PropertyEditors/ValueListUniqueValueValidator.cs rename to src/Umbraco.Infrastructure/PropertyEditors/ValueListUniqueValueValidator.cs index 38dc6fb3ae..c4f105fd02 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueListUniqueValueValidator.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueListUniqueValueValidator.cs @@ -10,7 +10,7 @@ namespace Umbraco.Web.PropertyEditors /// /// Represents a validator which ensures that all values in the list are unique. /// - internal class ValueListUniqueValueValidator : IValueValidator + public class ValueListUniqueValueValidator : IValueValidator { public IEnumerable Validate(object value, string valueType, object dataTypeConfiguration) { @@ -24,7 +24,7 @@ namespace Umbraco.Web.PropertyEditors var groupedValues = json.OfType() .Where(x => x["value"] != null) - .Select((x, index) => new { value = x["value"].ToString(), index}) + .Select((x, index) => new { value = x["value"].ToString(), index }) .Where(x => x.value.IsNullOrWhiteSpace() == false) .GroupBy(x => x.value); diff --git a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs index db35e71c5a..21ce6aa8f8 100644 --- a/src/Umbraco.Tests/Composing/TypeLoaderTests.cs +++ b/src/Umbraco.Tests/Composing/TypeLoaderTests.cs @@ -46,7 +46,8 @@ namespace Umbraco.Tests.Composing //typeof(TabPage).Assembly, typeof(System.Web.Mvc.ActionResult).Assembly, typeof(TypeFinder).Assembly, - typeof(UmbracoContext).Assembly + typeof(UmbracoContext).Assembly, + typeof(CheckBoxListPropertyEditor).Assembly }); @@ -274,7 +275,7 @@ AnotherContentFinder public void GetDataEditors() { var types = _typeLoader.GetDataEditors(); - Assert.AreEqual(37, types.Count()); + Assert.AreEqual(38, types.Count()); } /// diff --git a/src/Umbraco.Tests/Models/MediaXmlTest.cs b/src/Umbraco.Tests/Models/MediaXmlTest.cs index 793ba97827..2b9c4a32e2 100644 --- a/src/Umbraco.Tests/Models/MediaXmlTest.cs +++ b/src/Umbraco.Tests/Models/MediaXmlTest.cs @@ -34,9 +34,10 @@ namespace Umbraco.Tests.Models var config = Mock.Of(); var dataTypeService = Mock.Of(); var localizationService = Mock.Of(); + var umbracoSettingsSection = TestObjects.GetUmbracoSettings(); var mediaFileSystem = new MediaFileSystem(Mock.Of(), scheme, logger, ShortStringHelper); - var ignored = new FileUploadPropertyEditor(Mock.Of(), mediaFileSystem, config, DataTypeService, LocalizationService, LocalizedTextService, ShortStringHelper); + var ignored = new FileUploadPropertyEditor(Mock.Of(), mediaFileSystem, config, DataTypeService, LocalizationService, LocalizedTextService, ShortStringHelper, umbracoSettingsSection); var media = MockedMedia.CreateMediaImage(mediaType, -1); media.WriterId = -1; // else it's zero and that's not a user and it breaks the tests diff --git a/src/Umbraco.Tests/PropertyEditors/ImageCropperTest.cs b/src/Umbraco.Tests/PropertyEditors/ImageCropperTest.cs index 294938f691..f220387b75 100644 --- a/src/Umbraco.Tests/PropertyEditors/ImageCropperTest.cs +++ b/src/Umbraco.Tests/PropertyEditors/ImageCropperTest.cs @@ -84,8 +84,10 @@ namespace Umbraco.Tests.PropertyEditors var mediaFileSystem = new MediaFileSystem(Mock.Of(), scheme, logger, shortStringHelper); + var umbracoSettingsSection = Mock.Of(); + var dataTypeService = new TestObjects.TestDataTypeService( - new DataType(new ImageCropperPropertyEditor(Mock.Of(), mediaFileSystem, Mock.Of(), Mock.Of(), Mock.Of(), TestHelper.IOHelper, TestHelper.ShortStringHelper, Mock.Of())) { Id = 1 }); + new DataType(new ImageCropperPropertyEditor(Mock.Of(), mediaFileSystem, Mock.Of(), Mock.Of(), Mock.Of(), TestHelper.IOHelper, TestHelper.ShortStringHelper, Mock.Of(), umbracoSettingsSection)) { Id = 1 }); var factory = new PublishedContentTypeFactory(Mock.Of(), new PropertyValueConverterCollection(Array.Empty()), dataTypeService); diff --git a/src/Umbraco.Tests/Routing/MediaUrlProviderTests.cs b/src/Umbraco.Tests/Routing/MediaUrlProviderTests.cs index e5bb48da33..78ff71678d 100644 --- a/src/Umbraco.Tests/Routing/MediaUrlProviderTests.cs +++ b/src/Umbraco.Tests/Routing/MediaUrlProviderTests.cs @@ -34,11 +34,12 @@ namespace Umbraco.Tests.Routing var mediaFileSystemMock = Mock.Of(); var contentSection = Mock.Of(); var dataTypeService = Mock.Of(); + var umbracoSettingsSection = TestObjects.GetUmbracoSettings(); var propertyEditors = new PropertyEditorCollection(new DataEditorCollection(new IDataEditor[] { - new FileUploadPropertyEditor(logger, mediaFileSystemMock, contentSection, dataTypeService, LocalizationService, LocalizedTextService, ShortStringHelper), - new ImageCropperPropertyEditor(logger, mediaFileSystemMock, contentSection, dataTypeService, LocalizationService, IOHelper, ShortStringHelper, LocalizedTextService), + new FileUploadPropertyEditor(logger, mediaFileSystemMock, contentSection, dataTypeService, LocalizationService, LocalizedTextService, ShortStringHelper, umbracoSettingsSection), + new ImageCropperPropertyEditor(logger, mediaFileSystemMock, contentSection, dataTypeService, LocalizationService, IOHelper, ShortStringHelper, LocalizedTextService, umbracoSettingsSection), })); _mediaUrlProvider = new DefaultMediaUrlProvider(propertyEditors); } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 9fb7471a7f..5941e8e986 100755 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -466,23 +466,6 @@ - - - - - - - - - - - - - - - - - @@ -499,18 +482,8 @@ - - - - - - - - - - @@ -518,7 +491,6 @@ - @@ -650,8 +622,6 @@ - - @@ -809,12 +779,6 @@ - - - - - - @@ -834,21 +798,11 @@ - - - - - - - - - - @@ -946,12 +900,7 @@ - - - - -