From 1ec7595f058262932c48e5fee83f5aa6392fcbf4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Feb 2015 16:42:22 +0000 Subject: [PATCH] Releated to previous commit but for obsolete code - force URLs to lowercase when matching --- Repositories/UrlTrackerRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Repositories/UrlTrackerRepository.cs b/Repositories/UrlTrackerRepository.cs index 829b506..d9ee538 100644 --- a/Repositories/UrlTrackerRepository.cs +++ b/Repositories/UrlTrackerRepository.cs @@ -197,12 +197,12 @@ public static UrlTrackerModel GetUrlTrackerEntryById(int id) [Obsolete("Remove not found entries also with root id, use other method")] public static UrlTrackerModel GetNotFoundEntryByUrl(string url) { - return GetNotFoundEntries().Single(x => x.OldUrl == url); + return GetNotFoundEntries().Single(x => x.OldUrl.ToLower() == url.ToLower()); } public static UrlTrackerModel GetNotFoundEntryByRootAndUrl(int redirectRootNodeId, string url) { - return GetNotFoundEntries().Single(x => x.OldUrl == url && x.RedirectRootNodeId == redirectRootNodeId); + return GetNotFoundEntries().Single(x => x.OldUrl.ToLower() == url.ToLower() && x.RedirectRootNodeId == redirectRootNodeId); } public static List GetUrlTrackerEntries(int? maximumRows, int? startRowIndex, string sortExpression = "", bool _404 = false, bool include410Gone = false, bool showAutoEntries = true, bool showCustomEntries = true, bool showRegexEntries = true, string keyword = "", bool onlyForcedRedirects = false)