B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced

This commit is contained in:
2022-08-03 15:03:40 +00:00
parent f234174a51
commit b6d69fbd4c
8 changed files with 347 additions and 22 deletions

View File

@@ -2602,11 +2602,13 @@ namespace VEPROMS.CSLA.Library
//}
#endregion
#region UnlinkEnhanced
public void DoUnlinkEnhanced(ItemInfo enhii)
// B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced
// Add parameters to be passed down to query to only remove links from current procedure
public void DoUnlinkEnhanced(ItemInfo enhii, int enhType, bool onlyCur)
{
try
{
using (ContentInfoList cil = ContentInfoList.DoEnhancedUnlink(enhii.ItemID))
using (ContentInfoList cil = ContentInfoList.DoEnhancedUnlink(enhii.ItemID, enhType, onlyCur))
{
foreach (ContentInfo ci in cil)
{
@@ -7373,7 +7375,8 @@ namespace VEPROMS.CSLA.Library
if (seds != null && seds.Count != 0)
{
ItemInfo srcItem = ItemInfo.Get(seds[0].ItemID);
if (srcItem.DisplayTextKeepSpecialChars != ii.DisplayTextKeepSpecialChars)
// B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced. Null reference check
if (srcItem != null && srcItem.DisplayTextKeepSpecialChars != ii.DisplayTextKeepSpecialChars)
{
if (retiil == null) retiil = new ItemInfoList(ii);
else retiil.AddItem(ii);