Removes umbraco settings: ImageTagAllowedAttributes, UploadAllowDirectories, ensureUniqueNaming, ImageTagAllowedAttributes, ScriptEditorDisable, ScriptFolderPath, UploadAllowDirectories
This commit is contained in:
@@ -11,15 +11,9 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
[ConfigurationProperty("imaging")]
|
||||
internal ContentImagingElement Imaging => (ContentImagingElement) this["imaging"];
|
||||
|
||||
[ConfigurationProperty("scripteditor")]
|
||||
internal ContentScriptEditorElement ScriptEditor => (ContentScriptEditorElement) this["scripteditor"];
|
||||
|
||||
[ConfigurationProperty("ResolveUrlsFromTextString")]
|
||||
internal InnerTextConfigurationElement<bool> ResolveUrlsFromTextString => GetOptionalTextElement("ResolveUrlsFromTextString", false);
|
||||
|
||||
[ConfigurationProperty("UploadAllowDirectories")]
|
||||
internal InnerTextConfigurationElement<bool> UploadAllowDirectories => GetOptionalTextElement("UploadAllowDirectories", true);
|
||||
|
||||
public IEnumerable<IContentErrorPage> Error404Collection => Errors.Error404Collection;
|
||||
|
||||
[ConfigurationProperty("errors", IsRequired = true)]
|
||||
@@ -28,9 +22,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
[ConfigurationProperty("notifications", IsRequired = true)]
|
||||
internal NotificationsElement Notifications => (NotificationsElement) base["notifications"];
|
||||
|
||||
[ConfigurationProperty("ensureUniqueNaming")]
|
||||
internal InnerTextConfigurationElement<bool> EnsureUniqueNaming => GetOptionalTextElement("ensureUniqueNaming", true);
|
||||
|
||||
[ConfigurationProperty("XmlCacheEnabled")]
|
||||
internal InnerTextConfigurationElement<bool> XmlCacheEnabled => GetOptionalTextElement("XmlCacheEnabled", true);
|
||||
|
||||
@@ -85,22 +76,10 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
|
||||
IEnumerable<string> IContentSection.ImageFileTypes => Imaging.ImageFileTypes;
|
||||
|
||||
IEnumerable<string> IContentSection.ImageTagAllowedAttributes => Imaging.ImageTagAllowedAttributes;
|
||||
|
||||
IEnumerable<IImagingAutoFillUploadField> IContentSection.ImageAutoFillProperties => Imaging.ImageAutoFillProperties;
|
||||
|
||||
bool IContentSection.ScriptEditorDisable => ScriptEditor.ScriptEditorDisable;
|
||||
|
||||
string IContentSection.ScriptFolderPath => ScriptEditor.ScriptFolderPath;
|
||||
|
||||
IEnumerable<string> IContentSection.ScriptFileTypes => ScriptEditor.ScriptFileTypes;
|
||||
|
||||
bool IContentSection.ResolveUrlsFromTextString => ResolveUrlsFromTextString;
|
||||
|
||||
bool IContentSection.UploadAllowDirectories => UploadAllowDirectories;
|
||||
|
||||
bool IContentSection.EnsureUniqueNaming => EnsureUniqueNaming;
|
||||
|
||||
bool IContentSection.XmlCacheEnabled => XmlCacheEnabled;
|
||||
|
||||
bool IContentSection.ContinouslyUpdateXmlDiskCache => ContinouslyUpdateXmlDiskCache;
|
||||
|
||||
@@ -22,18 +22,6 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
return new[] {"jpeg", "jpg", "gif", "bmp", "png", "tiff", "tif"};
|
||||
}
|
||||
|
||||
[ConfigurationProperty("allowedAttributes")]
|
||||
internal CommaDelimitedConfigurationElement ImageTagAllowedAttributes
|
||||
{
|
||||
get
|
||||
{
|
||||
return new OptionalCommaDelimitedConfigurationElement(
|
||||
(CommaDelimitedConfigurationElement)this["allowedAttributes"],
|
||||
//set the default
|
||||
new[] { "src", "alt", "border", "class", "style", "align", "id", "name", "onclick", "usemap" });
|
||||
}
|
||||
}
|
||||
|
||||
private ImagingAutoFillPropertiesCollection _defaultImageAutoFill;
|
||||
|
||||
[ConfigurationCollection(typeof(ImagingAutoFillPropertiesCollection), AddItemName = "uploadField")]
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
{
|
||||
internal class ContentScriptEditorElement : UmbracoConfigurationElement
|
||||
{
|
||||
[ConfigurationProperty("scriptFolderPath")]
|
||||
internal InnerTextConfigurationElement<string> ScriptFolderPath
|
||||
{
|
||||
get { return GetOptionalTextElement("scriptFolderPath", "/scripts"); }
|
||||
}
|
||||
|
||||
[ConfigurationProperty("scriptFileTypes")]
|
||||
internal OptionalCommaDelimitedConfigurationElement ScriptFileTypes
|
||||
{
|
||||
get { return GetOptionalDelimitedElement("scriptFileTypes", new[] {"js", "xml"}); }
|
||||
}
|
||||
|
||||
[ConfigurationProperty("scriptDisableEditor")]
|
||||
internal InnerTextConfigurationElement<bool> ScriptEditorDisable
|
||||
{
|
||||
get { return GetOptionalTextElement("scriptDisableEditor", false); }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -11,24 +11,12 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
|
||||
IEnumerable<string> ImageFileTypes { get; }
|
||||
|
||||
IEnumerable<string> ImageTagAllowedAttributes { get; }
|
||||
|
||||
IEnumerable<IImagingAutoFillUploadField> ImageAutoFillProperties { get; }
|
||||
|
||||
string ScriptFolderPath { get; }
|
||||
|
||||
IEnumerable<string> ScriptFileTypes { get; }
|
||||
|
||||
bool ScriptEditorDisable { get; }
|
||||
|
||||
bool ResolveUrlsFromTextString { get; }
|
||||
|
||||
bool UploadAllowDirectories { get; }
|
||||
|
||||
IEnumerable<IContentErrorPage> Error404Collection { get; }
|
||||
|
||||
bool EnsureUniqueNaming { get; }
|
||||
|
||||
bool XmlCacheEnabled { get; }
|
||||
|
||||
bool ContinouslyUpdateXmlDiskCache { get; }
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace Umbraco.Core.IO
|
||||
/// <param name="filePath">The filepath to validate.</param>
|
||||
/// <param name="validFileExtensions">The valid extensions.</param>
|
||||
/// <returns>A value indicating whether the filepath is valid.</returns>
|
||||
internal static bool VerifyFileExtension(string filePath, List<string> validFileExtensions)
|
||||
internal static bool VerifyFileExtension(string filePath, IEnumerable<string> validFileExtensions)
|
||||
{
|
||||
var ext = Path.GetExtension(filePath);
|
||||
return ext != null && validFileExtensions.Contains(ext.TrimStart('.'));
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Umbraco.Core.IO.MediaPathSchemes
|
||||
// prevpath should be "<int>/<filename>" OR "<int>-<filename>"
|
||||
// and we want to reuse the "<int>" part, so try to find it
|
||||
|
||||
var sep = Current.Configs.Settings().Content.UploadAllowDirectories ? "/" : "-";
|
||||
const string sep = "/";
|
||||
var pos = previous.IndexOf(sep, StringComparison.Ordinal);
|
||||
var s = pos > 0 ? previous.Substring(0, pos) : null;
|
||||
|
||||
@@ -45,9 +45,7 @@ namespace Umbraco.Core.IO.MediaPathSchemes
|
||||
if (directory == null)
|
||||
throw new InvalidOperationException("Cannot use a null directory.");
|
||||
|
||||
return Current.Configs.Settings().Content.UploadAllowDirectories
|
||||
? Path.Combine(directory, filename).Replace('\\', '/')
|
||||
: directory + "-" + filename;
|
||||
return Path.Combine(directory, filename).Replace('\\', '/');
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -17,12 +17,13 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
/// </remarks>
|
||||
internal class DocumentBlueprintRepository : DocumentRepository, IDocumentBlueprintRepository
|
||||
{
|
||||
public DocumentBlueprintRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IContentSection settings)
|
||||
: base(scopeAccessor, appCaches, logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, settings)
|
||||
public DocumentBlueprintRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository)
|
||||
: base(scopeAccessor, appCaches, logger, contentTypeRepository, templateRepository, tagRepository, languageRepository)
|
||||
{
|
||||
EnsureUniqueNaming = false; // duplicates are allowed
|
||||
}
|
||||
|
||||
protected override bool EnsureUniqueNaming => false; // duplicates are allowed
|
||||
|
||||
protected override Guid NodeObjectTypeId => Constants.ObjectTypes.DocumentBlueprint;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
private readonly ContentByGuidReadRepository _contentByGuidReadRepository;
|
||||
private readonly IScopeAccessor _scopeAccessor;
|
||||
|
||||
public DocumentRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IContentSection settings)
|
||||
public DocumentRepository(IScopeAccessor scopeAccessor, AppCaches appCaches, ILogger logger, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository, ITagRepository tagRepository, ILanguageRepository languageRepository)
|
||||
: base(scopeAccessor, appCaches, languageRepository, logger)
|
||||
{
|
||||
_contentTypeRepository = contentTypeRepository ?? throw new ArgumentNullException(nameof(contentTypeRepository));
|
||||
@@ -39,12 +39,14 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
_appCaches = appCaches;
|
||||
_scopeAccessor = scopeAccessor;
|
||||
_contentByGuidReadRepository = new ContentByGuidReadRepository(this, scopeAccessor, appCaches, logger);
|
||||
EnsureUniqueNaming = settings.EnsureUniqueNaming;
|
||||
}
|
||||
|
||||
protected override DocumentRepository This => this;
|
||||
|
||||
public bool EnsureUniqueNaming { get; set; }
|
||||
/// <summary>
|
||||
/// Default is to always ensure all documents have unique names
|
||||
/// </summary>
|
||||
protected virtual bool EnsureUniqueNaming { get; } = true;
|
||||
|
||||
// note: is ok to 'new' the repo here as it's a sub-repo really
|
||||
private PermissionRepository<IContent> PermissionRepository => _permissionRepository
|
||||
|
||||
@@ -26,18 +26,16 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
private readonly ITagRepository _tagRepository;
|
||||
private readonly MediaByGuidReadRepository _mediaByGuidReadRepository;
|
||||
|
||||
public MediaRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, IContentSection contentSection, ILanguageRepository languageRepository)
|
||||
public MediaRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, IMediaTypeRepository mediaTypeRepository, ITagRepository tagRepository, ILanguageRepository languageRepository)
|
||||
: base(scopeAccessor, cache, languageRepository, logger)
|
||||
{
|
||||
_mediaTypeRepository = mediaTypeRepository ?? throw new ArgumentNullException(nameof(mediaTypeRepository));
|
||||
_tagRepository = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
|
||||
_mediaByGuidReadRepository = new MediaByGuidReadRepository(this, scopeAccessor, cache, logger);
|
||||
EnsureUniqueNaming = contentSection.EnsureUniqueNaming;
|
||||
}
|
||||
|
||||
protected override MediaRepository This => this;
|
||||
|
||||
public bool EnsureUniqueNaming { get; set; }
|
||||
|
||||
#region Repository Base
|
||||
|
||||
@@ -543,10 +541,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
media.ResetDirtyProperties(false);
|
||||
return media;
|
||||
}
|
||||
|
||||
protected override string EnsureUniqueNodeName(int parentId, string nodeName, int id = 0)
|
||||
{
|
||||
return EnsureUniqueNaming == false ? nodeName : base.EnsureUniqueNodeName(parentId, nodeName, id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
// validate path & extension
|
||||
var validDir = SystemDirectories.Scripts;
|
||||
var isValidPath = IOHelper.VerifyEditPath(fullPath, validDir);
|
||||
var validExts = _contentConfig.ScriptFileTypes.ToList();
|
||||
var validExts = new[] {"js"};
|
||||
var isValidExtension = IOHelper.VerifyFileExtension(script.Path, validExts);
|
||||
return isValidPath && isValidExtension;
|
||||
}
|
||||
|
||||
@@ -249,7 +249,6 @@
|
||||
<Compile Include="Configuration\UmbracoSettings\ContentErrorPageElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ContentErrorsElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ContentImagingElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ContentScriptEditorElement.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ContentSectionExtensions.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\DisabledLogTypesCollection.cs" />
|
||||
<Compile Include="Configuration\UmbracoSettings\ExternalLoggerElement.cs" />
|
||||
|
||||
@@ -42,32 +42,12 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
Assert.IsFalse(SettingsSection.Content.Error404Collection.ElementAt(2).HasContentId);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ScriptFolderPath()
|
||||
{
|
||||
Assert.AreEqual(SettingsSection.Content.ScriptFolderPath, "/scripts");
|
||||
}
|
||||
[Test]
|
||||
public void ScriptFileTypes()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Content.ScriptFileTypes.All(x => "js,xml".Split(',').Contains(x)));
|
||||
}
|
||||
[Test]
|
||||
public void DisableScriptEditor()
|
||||
{
|
||||
Assert.AreEqual(SettingsSection.Content.ScriptEditorDisable, false);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ImageFileTypes()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Content.ImageFileTypes.All(x => "jpeg,jpg,gif,bmp,png,tiff,tif".Split(',').Contains(x)));
|
||||
}
|
||||
[Test]
|
||||
public void AllowedAttributes()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Content.ImageTagAllowedAttributes.All(x => "src,alt,border,class,style,align,id,name,onclick,usemap".Split(',').Contains(x)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public virtual void ImageAutoFillProperties()
|
||||
{
|
||||
@@ -83,12 +63,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
Assert.AreEqual(SettingsSection.Content.ImageAutoFillProperties.ElementAt(1).LengthFieldAlias, "umbracoBytes2");
|
||||
Assert.AreEqual(SettingsSection.Content.ImageAutoFillProperties.ElementAt(1).ExtensionFieldAlias, "umbracoExtension2");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UploadAllowDirectories()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Content.UploadAllowDirectories);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DefaultDocumentTypeProperty()
|
||||
{
|
||||
@@ -104,11 +79,6 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Content.CloneXmlContent);
|
||||
}
|
||||
[Test]
|
||||
public void EnsureUniqueNaming()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Content.EnsureUniqueNaming);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ForceSafeAliases()
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var tagRepository = new TagRepository(scopeAccessor, cacheHelper, Logger);
|
||||
contentTypeRepository = new ContentTypeRepository(scopeAccessor, cacheHelper, Logger, templateRepository);
|
||||
var languageRepository = new LanguageRepository(scopeAccessor, cacheHelper, Logger);
|
||||
var repository = new DocumentRepository(scopeAccessor, cacheHelper, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository(scopeAccessor, cacheHelper, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository);
|
||||
return repository;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var tagRepository = new TagRepository(scopeAccessor, appCaches, Logger);
|
||||
contentTypeRepository = new ContentTypeRepository(scopeAccessor, appCaches, Logger, templateRepository);
|
||||
var languageRepository = new LanguageRepository(scopeAccessor, appCaches, Logger);
|
||||
var repository = new DocumentRepository(scopeAccessor, appCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository(scopeAccessor, appCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository);
|
||||
return repository;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var tagRepository = new TagRepository(accessor, Core.Cache.AppCaches.Disabled, Logger);
|
||||
contentTypeRepository = new ContentTypeRepository(accessor, Core.Cache.AppCaches.Disabled, Logger, templateRepository);
|
||||
languageRepository = new LanguageRepository(accessor, Core.Cache.AppCaches.Disabled, Logger);
|
||||
documentRepository = new DocumentRepository(accessor, Core.Cache.AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of<IContentSection>());
|
||||
documentRepository = new DocumentRepository(accessor, Core.Cache.AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository);
|
||||
var domainRepository = new DomainRepository(accessor, Core.Cache.AppCaches.Disabled, Logger);
|
||||
return domainRepository;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
mediaTypeRepository = new MediaTypeRepository(scopeAccessor, appCaches, Logger);
|
||||
var tagRepository = new TagRepository(scopeAccessor, appCaches, Logger);
|
||||
var repository = new MediaRepository(scopeAccessor, appCaches, Logger, mediaTypeRepository, tagRepository, Mock.Of<IContentSection>(), Mock.Of<ILanguageRepository>());
|
||||
var repository = new MediaRepository(scopeAccessor, appCaches, Logger, mediaTypeRepository, tagRepository, Mock.Of<ILanguageRepository>());
|
||||
return repository;
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var tagRepository = new TagRepository(accessor, AppCaches, Logger);
|
||||
contentTypeRepository = new ContentTypeRepository(accessor, AppCaches, Logger, templateRepository);
|
||||
var languageRepository = new LanguageRepository(accessor, AppCaches, Logger);
|
||||
var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository);
|
||||
return repository;
|
||||
}
|
||||
|
||||
|
||||
@@ -957,7 +957,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var tagRepository = new TagRepository(accessor, AppCaches.Disabled, Logger);
|
||||
contentTypeRepository = new ContentTypeRepository(accessor, AppCaches.Disabled, Logger, templateRepository);
|
||||
var languageRepository = new LanguageRepository(accessor, AppCaches.Disabled, Logger);
|
||||
var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository);
|
||||
return repository;
|
||||
}
|
||||
|
||||
@@ -966,7 +966,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var accessor = (IScopeAccessor) provider;
|
||||
var tagRepository = new TagRepository(accessor, AppCaches.Disabled, Logger);
|
||||
mediaTypeRepository = new MediaTypeRepository(accessor, AppCaches.Disabled, Logger);
|
||||
var repository = new MediaRepository(accessor, AppCaches.Disabled, Logger, mediaTypeRepository, tagRepository, Mock.Of<IContentSection>(), Mock.Of<ILanguageRepository>());
|
||||
var repository = new MediaRepository(accessor, AppCaches.Disabled, Logger, mediaTypeRepository, tagRepository, Mock.Of<ILanguageRepository>());
|
||||
return repository;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var tagRepository = new TagRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger);
|
||||
var contentTypeRepository = new ContentTypeRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger, templateRepository);
|
||||
var languageRepository = new LanguageRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger);
|
||||
var contentRepo = new DocumentRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of<IContentSection>());
|
||||
var contentRepo = new DocumentRepository((IScopeAccessor) ScopeProvider, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository);
|
||||
|
||||
var contentType = MockedContentTypes.CreateSimpleContentType("umbTextpage2", "Textpage");
|
||||
ServiceContext.FileService.SaveTemplate(contentType.DefaultTemplate); // else, FK violation on contentType!
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var accessor = (IScopeAccessor) provider;
|
||||
mediaTypeRepository = new MediaTypeRepository(accessor, AppCaches, Mock.Of<ILogger>());
|
||||
var tagRepository = new TagRepository(accessor, AppCaches, Mock.Of<ILogger>());
|
||||
var repository = new MediaRepository(accessor, AppCaches, Mock.Of<ILogger>(), mediaTypeRepository, tagRepository, Mock.Of<IContentSection>(), Mock.Of<ILanguageRepository>());
|
||||
var repository = new MediaRepository(accessor, AppCaches, Mock.Of<ILogger>(), mediaTypeRepository, tagRepository, Mock.Of<ILanguageRepository>());
|
||||
return repository;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var tagRepository = new TagRepository(accessor, AppCaches, Logger);
|
||||
contentTypeRepository = new ContentTypeRepository(accessor, AppCaches, Logger, templateRepository);
|
||||
var languageRepository = new LanguageRepository(accessor, AppCaches, Logger);
|
||||
var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository(accessor, AppCaches, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository);
|
||||
return repository;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace Umbraco.Tests.Services
|
||||
var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger);
|
||||
var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository);
|
||||
var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger);
|
||||
var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository);
|
||||
|
||||
// Act
|
||||
Stopwatch watch = Stopwatch.StartNew();
|
||||
@@ -200,7 +200,7 @@ namespace Umbraco.Tests.Services
|
||||
var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger);
|
||||
var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository);
|
||||
var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger);
|
||||
var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository);
|
||||
|
||||
// Act
|
||||
Stopwatch watch = Stopwatch.StartNew();
|
||||
@@ -231,7 +231,7 @@ namespace Umbraco.Tests.Services
|
||||
var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger);
|
||||
var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository);
|
||||
var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger);
|
||||
var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository);
|
||||
|
||||
// Act
|
||||
var contents = repository.GetMany();
|
||||
@@ -265,7 +265,7 @@ namespace Umbraco.Tests.Services
|
||||
var tagRepo = new TagRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger);
|
||||
var ctRepository = new ContentTypeRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, tRepository);
|
||||
var languageRepository = new LanguageRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger);
|
||||
var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository((IScopeAccessor) provider, AppCaches.Disabled, Logger, ctRepository, tRepository, tagRepo, languageRepository);
|
||||
|
||||
// Act
|
||||
var contents = repository.GetMany();
|
||||
|
||||
@@ -3041,7 +3041,7 @@ namespace Umbraco.Tests.Services
|
||||
var tagRepository = new TagRepository(accessor, AppCaches.Disabled, Logger);
|
||||
contentTypeRepository = new ContentTypeRepository(accessor, AppCaches.Disabled, Logger, templateRepository);
|
||||
var languageRepository = new LanguageRepository(accessor, AppCaches.Disabled, Logger);
|
||||
var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository, Mock.Of<IContentSection>());
|
||||
var repository = new DocumentRepository(accessor, AppCaches.Disabled, Logger, contentTypeRepository, templateRepository, tagRepository, languageRepository);
|
||||
return repository;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
<error404>1</error404>
|
||||
<!--
|
||||
The value for error pages can be:
|
||||
* A content item's integer ID (example: 1234)
|
||||
* A content item's GUID ID (example: 26C1D84F-C900-4D53-B167-E25CC489DAC8)
|
||||
* An XPath statement (example: //errorPages[@nodeName='My cool error']
|
||||
* A content item's integer ID (example: 1234)
|
||||
-->
|
||||
<!--
|
||||
<error404>
|
||||
<errorPage culture="default">1</errorPage>
|
||||
<errorPage culture="en-US">200</errorPage>
|
||||
<errorPage culture="default">26C1D84F-C900-4D53-B167-E25CC489DAC8</errorPage>
|
||||
<errorPage culture="en-US">D820E120-6865-4D88-BFFE-48801A6AC375</errorPage>
|
||||
</error404>
|
||||
-->
|
||||
</errors>
|
||||
|
||||
@@ -5,189 +5,174 @@
|
||||
<tours enable="true"></tours>
|
||||
</backOffice>
|
||||
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension that should cause umbraco to create thumbnails -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif,svg</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>src,alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
<!-- automatically updates dimension, filesize and extension attributes on upload -->
|
||||
<autoFillImageProperties>
|
||||
<uploadField alias="umbracoFile">
|
||||
<widthFieldAlias>umbracoWidth</widthFieldAlias>
|
||||
<heightFieldAlias>umbracoHeight</heightFieldAlias>
|
||||
<lengthFieldAlias>umbracoBytes</lengthFieldAlias>
|
||||
<extensionFieldAlias>umbracoExtension</extensionFieldAlias>
|
||||
</uploadField>
|
||||
</autoFillImageProperties>
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension should umbraco determine are images for uploaded files -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif,svg</imageFileTypes>
|
||||
<!-- defines the property that contains an image with a URL and the properties to update with it's dimensions -->
|
||||
<autoFillImageProperties>
|
||||
<uploadField alias="umbracoFile">
|
||||
<widthFieldAlias>umbracoWidth</widthFieldAlias>
|
||||
<heightFieldAlias>umbracoHeight</heightFieldAlias>
|
||||
<lengthFieldAlias>umbracoBytes</lengthFieldAlias>
|
||||
<extensionFieldAlias>umbracoExtension</extensionFieldAlias>
|
||||
</uploadField>
|
||||
</autoFillImageProperties>
|
||||
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
<scriptFolderPath>/scripts</scriptFolderPath>
|
||||
<!-- what files can be opened/created in the script editor -->
|
||||
<scriptFileTypes>js,xml</scriptFileTypes>
|
||||
<!-- disable the codemirror editor and use a simple textarea instead -->
|
||||
<scriptDisableEditor>false</scriptDisableEditor>
|
||||
</scripteditor>
|
||||
</imaging>
|
||||
|
||||
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
|
||||
should be set to false if the application pool's user account hasn't got readrights of the driveroot up to the /media directory -->
|
||||
<UploadAllowDirectories>True</UploadAllowDirectories>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!--<error404>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!--<error404>
|
||||
<errorPage culture="default">1</errorPage>
|
||||
<errorPage culture="en-US">200</errorPage>
|
||||
</error404>-->
|
||||
<error404>
|
||||
<errorPage culture="default">1</errorPage>
|
||||
<errorPage culture="fr-FR">1079</errorPage>
|
||||
<errorPage culture="en-US">1080</errorPage>
|
||||
</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<!-- you can add a display name to the email like this: <email>Your display name here <your@email.here></email> -->
|
||||
<email>your@email.here</email>
|
||||
</notifications>
|
||||
<error404>
|
||||
<errorPage culture="default">1</errorPage>
|
||||
<errorPage culture="fr-FR">1079</errorPage>
|
||||
<errorPage culture="en-US">1080</errorPage>
|
||||
</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<!-- you can add a display name to the email like this: <email>Your display name here <your@email.here></email> -->
|
||||
<email>your@email.here</email>
|
||||
</notifications>
|
||||
|
||||
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
|
||||
<ensureUniqueNaming>True</ensureUniqueNaming>
|
||||
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
|
||||
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
|
||||
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
|
||||
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
<!-- Update in-memory cache if xml file is changed -->
|
||||
<XmlContentCheckForDiskChanges>False</XmlContentCheckForDiskChanges>
|
||||
|
||||
<!-- Update in-memory cache if xml file is changed -->
|
||||
<XmlContentCheckForDiskChanges>False</XmlContentCheckForDiskChanges>
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
|
||||
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
|
||||
<PreviewBadge>
|
||||
<![CDATA[
|
||||
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
|
||||
<PreviewBadge>
|
||||
<![CDATA[
|
||||
<a id="umbracoPreviewBadge" style="z-index:99999; position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{0}/assets/img/preview-mode-badge.png') no-repeat;" href="#" OnClick="javascript:window.top.location.href = '{0}/preview/end?redir={1}'"><span style="display:none;">In Preview Mode - click to end</span></a>
|
||||
]]></PreviewBadge>
|
||||
]]>
|
||||
</PreviewBadge>
|
||||
|
||||
|
||||
<!-- Url Resolving ensures that all links works if you run Umbraco in virtual directories -->
|
||||
<!-- Setting this to true can increase render time for pages with a large number of links -->
|
||||
<!-- If running Umbraco in virtual directory this *must* be set to true! -->
|
||||
<ResolveUrlsFromTextString>false</ResolveUrlsFromTextString>
|
||||
<!-- Url Resolving ensures that all links works if you run Umbraco in virtual directories -->
|
||||
<!-- Setting this to true can increase render time for pages with a large number of links -->
|
||||
<!-- If running Umbraco in virtual directory this *must* be set to true! -->
|
||||
<ResolveUrlsFromTextString>false</ResolveUrlsFromTextString>
|
||||
|
||||
<!-- How Umbraco should handle errors during macro execution. Can be one of the following values:
|
||||
<!-- How Umbraco should handle errors during macro execution. Can be one of the following values:
|
||||
- inline - show an inline error within the macro but allow the page to continue rendering. Historial Umbraco behaviour.
|
||||
- silent - Silently suppress the error and do not render the offending macro.
|
||||
- throw - Throw an exception which can be caught by the global error handler defined in Application_OnError. If no such
|
||||
error handler is defined then you'll see the Yellow Screen Of Death (YSOD) error page.
|
||||
Note the error can also be handled by the umbraco.macro.Error event, where you can log/alarm with your own code and change the behaviour per event. -->
|
||||
<MacroErrors>throw</MacroErrors>
|
||||
<MacroErrors>throw</MacroErrors>
|
||||
|
||||
<!-- These file types will not be allowed to be uploaded via the upload control for media and content -->
|
||||
<disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,php,htaccess</disallowedUploadFiles>
|
||||
<!-- These file types will not be allowed to be uploaded via the upload control for media and content -->
|
||||
<disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,php,htaccess</disallowedUploadFiles>
|
||||
|
||||
<!-- If completed, only the file extensions listed below will be allowed to be uploaded. If empty, disallowedUploadFiles will apply to prevent upload of specific file extensions. -->
|
||||
<allowedUploadFiles></allowedUploadFiles>
|
||||
<!-- If completed, only the file extensions listed below will be allowed to be uploaded. If empty, disallowedUploadFiles will apply to prevent upload of specific file extensions. -->
|
||||
<allowedUploadFiles></allowedUploadFiles>
|
||||
|
||||
<!-- Defines the default document type property used when adding properties in the back-office (if missing or empty, defaults to Textstring -->
|
||||
<defaultDocumentTypeProperty>Textstring</defaultDocumentTypeProperty>
|
||||
<!-- Defines the default document type property used when adding properties in the back-office (if missing or empty, defaults to Textstring -->
|
||||
<defaultDocumentTypeProperty>Textstring</defaultDocumentTypeProperty>
|
||||
|
||||
<showDeprecatedPropertyEditors>false</showDeprecatedPropertyEditors>
|
||||
<showDeprecatedPropertyEditors>false</showDeprecatedPropertyEditors>
|
||||
|
||||
<!-- Enables value converters for all built in property editors so that they return strongly typed object, recommended for use with Models Builder -->
|
||||
<!--
|
||||
<!-- Enables value converters for all built in property editors so that they return strongly typed object, recommended for use with Models Builder -->
|
||||
<!--
|
||||
<EnablePropertyValueConverters>true</EnablePropertyValueConverters>
|
||||
-->
|
||||
|
||||
<!-- You can specify your own background image for the login screen here. The image will automatically get an overlay to match back office colors - this path is relative to the ~/umbraco path. The default location is: /umbraco/assets/img/installer.jpg -->
|
||||
<loginBackgroundImage>assets/img/installer.jpg</loginBackgroundImage>
|
||||
<!-- You can specify your own background image for the login screen here. The image will automatically get an overlay to match back office colors - this path is relative to the ~/umbraco path. The default location is: /umbraco/assets/img/installer.jpg -->
|
||||
<loginBackgroundImage>assets/img/installer.jpg</loginBackgroundImage>
|
||||
|
||||
</content>
|
||||
</content>
|
||||
|
||||
<security>
|
||||
<!-- set to true to auto update login interval (and there by disabling the lock screen -->
|
||||
<keepUserLoggedIn>true</keepUserLoggedIn>
|
||||
<security>
|
||||
<!-- set to true to auto update login interval (and there by disabling the lock screen -->
|
||||
<keepUserLoggedIn>true</keepUserLoggedIn>
|
||||
|
||||
<!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->
|
||||
<hideDisabledUsersInBackoffice>false</hideDisabledUsersInBackoffice>
|
||||
<!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->
|
||||
<hideDisabledUsersInBackoffice>false</hideDisabledUsersInBackoffice>
|
||||
|
||||
<!-- set to true to enable the UI and API to allow back-office users to reset their passwords -->
|
||||
<allowPasswordReset>true</allowPasswordReset>
|
||||
<!-- set to true to enable the UI and API to allow back-office users to reset their passwords -->
|
||||
<allowPasswordReset>true</allowPasswordReset>
|
||||
|
||||
</security>
|
||||
</security>
|
||||
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>true</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true" toAscii="try">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="'"></char>
|
||||
<char org="%"></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org="\"></char>
|
||||
<char org=":"></char>
|
||||
<char org="#"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="Ã¥">aa</char>
|
||||
<char org="ä">ae</char>
|
||||
<char org="ö">oe</char>
|
||||
<char org="ü">ue</char>
|
||||
<char org="ß">ss</char>
|
||||
<char org="Ä">ae</char>
|
||||
<char org="Ö">oe</char>
|
||||
<char org="|">-</char>
|
||||
<char org="<"></char>
|
||||
<char org=">"></char>
|
||||
</urlReplacing>
|
||||
</requestHandler>
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>true</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true" toAscii="try">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="'"></char>
|
||||
<char org="%"></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org="\"></char>
|
||||
<char org=":"></char>
|
||||
<char org="#"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="Ã¥">aa</char>
|
||||
<char org="ä">ae</char>
|
||||
<char org="ö">oe</char>
|
||||
<char org="ü">ue</char>
|
||||
<char org="ß">ss</char>
|
||||
<char org="Ä">ae</char>
|
||||
<char org="Ö">oe</char>
|
||||
<char org="|">-</char>
|
||||
<char org="<"></char>
|
||||
<char org=">"></char>
|
||||
</urlReplacing>
|
||||
</requestHandler>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
Now that we have external logging enabled, this section is only used for what gets logged to the umbracoLog table
|
||||
which currently logs items used in the audit trail and roll back scenarios.
|
||||
-->
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<!-- You can add your own logging tool by implementing the umbraco.BusinessLogic.Interfaces.ILog interface and add the reference here -->
|
||||
<!-- The external logger can also act as the audit trail storage by setting the logAuditTrail attribute to true -->
|
||||
<!--<externalLogger assembly="~/bin/assemblyFileName.dll" type="fully.qualified.namespace.and.type" logAuditTrail="false" /> -->
|
||||
</logging>
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<!-- You can add your own logging tool by implementing the umbraco.BusinessLogic.Interfaces.ILog interface and add the reference here -->
|
||||
<!-- The external logger can also act as the audit trail storage by setting the logAuditTrail attribute to true -->
|
||||
<!--<externalLogger assembly="~/bin/assemblyFileName.dll" type="fully.qualified.namespace.and.type" logAuditTrail="false" /> -->
|
||||
</logging>
|
||||
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
web.routing
|
||||
@trySkipIisCustomErrors
|
||||
Tries to skip IIS custom errors.
|
||||
@@ -220,10 +205,10 @@
|
||||
Configure it here if you need anything specific. Needs to be a complete url with scheme and umbraco
|
||||
path, eg http://mysite.com/umbraco. NOT just "mysite.com" or "mysite.com/umbraco" or "http://mysite.com".
|
||||
-->
|
||||
<web.routing
|
||||
trySkipIisCustomErrors="false"
|
||||
internalRedirectPreservesTemplate="false" disableAlternativeTemplates="false" validateAlternativeTemplates="false" disableFindContentByIdPath="false"
|
||||
umbracoApplicationUrl="">
|
||||
</web.routing>
|
||||
<web.routing
|
||||
trySkipIisCustomErrors="false"
|
||||
internalRedirectPreservesTemplate="false" disableAlternativeTemplates="false" validateAlternativeTemplates="false" disableFindContentByIdPath="false"
|
||||
umbracoApplicationUrl="">
|
||||
</web.routing>
|
||||
|
||||
</settings>
|
||||
|
||||
+6
-6
@@ -11,14 +11,14 @@ namespace Umbraco.Web.Routing
|
||||
/// <summary>
|
||||
/// Provides an implementation of <see cref="IContentFinder"/> that runs the legacy 404 logic.
|
||||
/// </summary>
|
||||
public class ContentFinderByLegacy404 : IContentLastChanceFinder
|
||||
public class ContentFinderByConfigured404 : IContentLastChanceFinder
|
||||
{
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly IEntityService _entityService;
|
||||
private readonly IContentSection _contentConfigSection;
|
||||
|
||||
public ContentFinderByLegacy404(ILogger logger, IEntityService entityService, IContentSection contentConfigSection)
|
||||
public ContentFinderByConfigured404(ILogger logger, IEntityService entityService, IContentSection contentConfigSection)
|
||||
{
|
||||
_logger = logger;
|
||||
_entityService = entityService;
|
||||
@@ -32,7 +32,7 @@ namespace Umbraco.Web.Routing
|
||||
/// <returns>A value indicating whether an Umbraco document was found and assigned.</returns>
|
||||
public bool TryFindContent(PublishedRequest frequest)
|
||||
{
|
||||
_logger.Debug<ContentFinderByLegacy404>("Looking for a page to handle 404.");
|
||||
_logger.Debug<ContentFinderByConfigured404>("Looking for a page to handle 404.");
|
||||
|
||||
// try to find a culture as best as we can
|
||||
var errorCulture = CultureInfo.CurrentUICulture;
|
||||
@@ -70,17 +70,17 @@ namespace Umbraco.Web.Routing
|
||||
|
||||
if (error404.HasValue)
|
||||
{
|
||||
_logger.Debug<ContentFinderByLegacy404>("Got id={ErrorNodeId}.", error404.Value);
|
||||
_logger.Debug<ContentFinderByConfigured404>("Got id={ErrorNodeId}.", error404.Value);
|
||||
|
||||
content = frequest.UmbracoContext.ContentCache.GetById(error404.Value);
|
||||
|
||||
_logger.Debug<ContentFinderByLegacy404>(content == null
|
||||
_logger.Debug<ContentFinderByConfigured404>(content == null
|
||||
? "Could not find content with that id."
|
||||
: "Found corresponding content.");
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.Debug<ContentFinderByLegacy404>("Got nothing.");
|
||||
_logger.Debug<ContentFinderByConfigured404>("Got nothing.");
|
||||
}
|
||||
|
||||
frequest.PublishedContent = content;
|
||||
@@ -151,7 +151,7 @@ namespace Umbraco.Web.Runtime
|
||||
.Append<DefaultUrlProvider>()
|
||||
.Append<CustomRouteUrlProvider>();
|
||||
|
||||
composition.RegisterUnique<IContentLastChanceFinder, ContentFinderByLegacy404>();
|
||||
composition.RegisterUnique<IContentLastChanceFinder, ContentFinderByConfigured404>();
|
||||
|
||||
composition.WithCollectionBuilder<ContentFinderCollectionBuilder>()
|
||||
// all built-in finders in the correct order,
|
||||
|
||||
@@ -1100,7 +1100,7 @@
|
||||
<Compile Include="PropertyEditors\ValueConverters\RteMacroRenderingValueConverter.cs" />
|
||||
<Compile Include="RouteCollectionExtensions.cs" />
|
||||
<Compile Include="Routing\AliasUrlProvider.cs" />
|
||||
<Compile Include="Routing\ContentFinderByLegacy404.cs" />
|
||||
<Compile Include="Routing\ContentFinderByConfigured404.cs" />
|
||||
<Compile Include="Routing\ContentFinderByPageIdQuery.cs" />
|
||||
<Compile Include="Routing\ISiteDomainHelper.cs" />
|
||||
<Compile Include="Routing\RoutableAttemptEventArgs.cs" />
|
||||
|
||||
Reference in New Issue
Block a user