Merge remote-tracking branch 'origin/netcore/netcore' into feature/8651-config-options-patten

# Conflicts:
#	src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs
#	src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidatorBase.cs
#	src/Umbraco.ModelsBuilder.Embedded/BackOffice/ModelsBuilderDashboardController.cs
#	src/Umbraco.ModelsBuilder.Embedded/Building/ModelsGenerator.cs
#	src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs
#	src/Umbraco.ModelsBuilder.Embedded/ModelsGenerationError.cs
#	src/Umbraco.ModelsBuilder.Embedded/OutOfDateModelsStatus.cs
#	src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs
#	src/Umbraco.Web.BackOffice/Controllers/RedirectUrlManagementController.cs
This commit is contained in:
Bjarke Berg
2020-09-10 14:01:38 +02:00
249 changed files with 6053 additions and 4380 deletions

View File

@@ -41,9 +41,6 @@ namespace Umbraco.Web.Routing
public void Initialize()
{
// don't let the event handlers kick in if Redirect Tracking is turned off in the config
if (_webRoutingSettings.DisableRedirectUrlTracking) return;
ContentService.Publishing += ContentService_Publishing;
ContentService.Published += ContentService_Published;
ContentService.Moving += ContentService_Moving;
@@ -67,6 +64,9 @@ namespace Umbraco.Web.Routing
private void ContentService_Publishing(IContentService sender, PublishEventArgs<IContent> args)
{
// don't let the event handlers kick in if Redirect Tracking is turned off in the config
if (_webRoutingSettings.DisableRedirectUrlTracking) return;
var oldRoutes = GetOldRoutes(args.EventState);
foreach (var entity in args.PublishedEntities)
{
@@ -76,12 +76,18 @@ namespace Umbraco.Web.Routing
private void ContentService_Published(IContentService sender, ContentPublishedEventArgs args)
{
// don't let the event handlers kick in if Redirect Tracking is turned off in the config
if (_webRoutingSettings.DisableRedirectUrlTracking) return;
var oldRoutes = GetOldRoutes(args.EventState);
CreateRedirects(oldRoutes);
}
private void ContentService_Moving(IContentService sender, MoveEventArgs<IContent> args)
{
// don't let the event handlers kick in if Redirect Tracking is turned off in the config
if (_webRoutingSettings.DisableRedirectUrlTracking) return;
var oldRoutes = GetOldRoutes(args.EventState);
foreach (var info in args.MoveInfoCollection)
{
@@ -91,6 +97,9 @@ namespace Umbraco.Web.Routing
private void ContentService_Moved(IContentService sender, MoveEventArgs<IContent> args)
{
// don't let the event handlers kick in if Redirect Tracking is turned off in the config
if (_webRoutingSettings.DisableRedirectUrlTracking) return;
var oldRoutes = GetOldRoutes(args.EventState);
CreateRedirects(oldRoutes);
}