From efcaea264d70f44b98bf4b4ce37c73070ac8ed26 Mon Sep 17 00:00:00 2001 From: "DK\\IRO" Date: Tue, 17 Jul 2018 14:48:39 +0300 Subject: [PATCH] Make compatible with 8.1.3 + add the same logic to Relink --- .../Dialogs/BreakingLinks/BreakingLinksForm.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Sitecore.Support.221558/Shell/Applications/Dialogs/BreakingLinks/BreakingLinksForm.cs b/src/Sitecore.Support.221558/Shell/Applications/Dialogs/BreakingLinks/BreakingLinksForm.cs index be5a52f..b9cc640 100644 --- a/src/Sitecore.Support.221558/Shell/Applications/Dialogs/BreakingLinks/BreakingLinksForm.cs +++ b/src/Sitecore.Support.221558/Shell/Applications/Dialogs/BreakingLinks/BreakingLinksForm.cs @@ -24,9 +24,9 @@ namespace Sitecore.Support.Shell.Applications.Dialogs.BreakingLinks public class BreakingLinksForm : DialogForm { /// - /// Represents a RemoveLinks. - /// - public class RemoveLinks + /// Represents a RemoveLinks. + /// + public class RemoveLinks { #region Fields @@ -114,8 +114,9 @@ private static void RemoveLink([NotNull] Item version, [NotNull] ItemLink itemLi version.Editing.BeginEdit(); customField.RemoveLink(itemLink); - // #221558: make sure the unverioned statistics-related fields won't be updated. + #region Modified code version.Editing.EndEdit(false, false); + #endregion } } @@ -360,8 +361,9 @@ private void RelinkLink([NotNull] Item sourceItem, [NotNull] ItemLink itemLink) customField.Relink(itemLink, this.item); Log.Audit(this, "Relink: {0}, ReferrerItem: {1}", AuditFormatter.FormatItem(this.item), AuditFormatter.FormatItem(sourceItem)); } - - sourceItem.Editing.EndEdit(); + #region Modified code + sourceItem.Editing.EndEdit(false, false); + #endregion } } @@ -754,7 +756,7 @@ private void BuildItemsToBeDeleted() htmlTextWriter.Write(""); htmlTextWriter.Write(""); htmlTextWriter.Write("
"); - htmlTextWriter.Write(item.GetUIDisplayName()); + htmlTextWriter.Write(item.DisplayName); htmlTextWriter.Write("
"); htmlTextWriter.Write("
"); htmlTextWriter.Write(item.Paths.ContentPath);