Skip to content

Commit

Permalink
Make compatible with 8.1.3 + add the same logic to Relink
Browse files Browse the repository at this point in the history
  • Loading branch information
IhorRomanko committed Jul 17, 2018
1 parent 1a24f04 commit efcaea2
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ namespace Sitecore.Support.Shell.Applications.Dialogs.BreakingLinks
public class BreakingLinksForm : DialogForm
{
/// <summary>
/// Represents a RemoveLinks.
/// </summary>
public class RemoveLinks
/// Represents a RemoveLinks.
/// </summary>
public class RemoveLinks
{
#region Fields

Expand Down Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand Down Expand Up @@ -754,7 +756,7 @@ private void BuildItemsToBeDeleted()
htmlTextWriter.Write("</td>");
htmlTextWriter.Write("<td>");
htmlTextWriter.Write("<div class=\"scLinkHeader\">");
htmlTextWriter.Write(item.GetUIDisplayName());
htmlTextWriter.Write(item.DisplayName);
htmlTextWriter.Write("</div>");
htmlTextWriter.Write("<div class=\"scLinkDetails\">");
htmlTextWriter.Write(item.Paths.ContentPath);
Expand Down

0 comments on commit efcaea2

Please sign in to comment.