Development #450
@@ -1165,13 +1165,17 @@ namespace VEPROMS.CSLA.Library
 | 
			
		||||
					{
 | 
			
		||||
						int sp = odte.Link.IndexOf(" ") + 1;   // get past tran type
 | 
			
		||||
						string srecid = odte.Link.Substring(sp, odte.Link.IndexOf(" ", sp) - sp);
 | 
			
		||||
						recid = System.Convert.ToInt32(srecid);
 | 
			
		||||
						foreach (ContentTransition ct in itm.MyContent.ContentTransitions)
 | 
			
		||||
 | 
			
		||||
						//CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is
 | 
			
		||||
						if (int.TryParse(srecid, out recid))
 | 
			
		||||
						{
 | 
			
		||||
							if (ct.TransitionID == recid)
 | 
			
		||||
							foreach (ContentTransition ct in itm.MyContent.ContentTransitions)
 | 
			
		||||
							{
 | 
			
		||||
								itm.MyContent.ContentTransitions.Remove(ct);
 | 
			
		||||
								break;
 | 
			
		||||
								if (ct.TransitionID == recid)
 | 
			
		||||
								{
 | 
			
		||||
									itm.MyContent.ContentTransitions.Remove(ct);
 | 
			
		||||
									break;
 | 
			
		||||
								}
 | 
			
		||||
							}
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
@@ -1656,7 +1660,15 @@ namespace VEPROMS.CSLA.Library
 | 
			
		||||
		private string FixTransition(string link, string text)
 | 
			
		||||
		{
 | 
			
		||||
			if (link.IndexOf("<NewID>") != -1) return text;
 | 
			
		||||
			int transitionID = Convert.ToInt32(link.Split(" ".ToCharArray())[1]);
 | 
			
		||||
 | 
			
		||||
			//CSM B2024-078 - when a bad transition link / does not contain a number, simply return the text as-is
 | 
			
		||||
			int transitionID;
 | 
			
		||||
			string[] splt_link = link.Split(' ');
 | 
			
		||||
			if (splt_link.Length < 2 || !int.TryParse(splt_link[1], out transitionID))
 | 
			
		||||
			{
 | 
			
		||||
				return text;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Find the transition
 | 
			
		||||
			if (_MyItemInfo.MyContent.ContentTransitionCount <= 0)
 | 
			
		||||
			{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user