Fix: U4-5180 Notifications email highlighting is incorrect. Ensured the versions of content used in comparison is sorted correctly so the highlighting is based on previous version and not the base version of the content.

This commit is contained in:
Claus
2015-08-06 10:32:41 +02:00
parent 91a5b19378
commit 227e2489c1

View File

@@ -204,6 +204,8 @@ namespace Umbraco.Core.Services
if (createSubject == null) throw new ArgumentNullException("createSubject");
if (createBody == null) throw new ArgumentNullException("createBody");
allVersions = allVersions.OrderBy(x => x.UpdateDate).ToArray();
int versionCount = (allVersions.Length > 1) ? (allVersions.Length - 2) : (allVersions.Length - 1);
var oldDoc = _contentService.GetByVersion(allVersions[versionCount].Version);