From 9b925a2a85fcb65611370634bd6912392df534d4 Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Tue, 13 Jul 2010 11:31:39 -0700 Subject: [PATCH] Small update to the localization service's GetLocalizations w/ a note to also query for scheduled items --HG-- branch : dev --- .../Core/Localization/Services/LocalizationService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Core/Localization/Services/LocalizationService.cs b/src/Orchard.Web/Core/Localization/Services/LocalizationService.cs index fe79e8902..7f440d22f 100644 --- a/src/Orchard.Web/Core/Localization/Services/LocalizationService.cs +++ b/src/Orchard.Web/Core/Localization/Services/LocalizationService.cs @@ -33,13 +33,15 @@ namespace Orchard.Core.Localization.Services { IEnumerable ILocalizationService.GetLocalizations(IContent content) { var localized = content.As(); + //todo: (heskew) get scheduled content as well + if (localized.MasterContentItem != null) - return _contentManager.Query(content.ContentItem.ContentType).Join() + return _contentManager.Query(VersionOptions.Latest, content.ContentItem.ContentType).Join() .List() .Select(i => i.As()) .Where(l => l.Id != content.ContentItem.Id && (l.Id == localized.MasterContentItem.ContentItem.Id || l.MasterContentItem != null && l.MasterContentItem.ContentItem.Id == localized.MasterContentItem.ContentItem.Id)); - return _contentManager.Query(content.ContentItem.ContentType).Join() + return _contentManager.Query(VersionOptions.Latest, content.ContentItem.ContentType).Join() .List() .Select(i => i.As()) .Where(l => l.MasterContentItem != null && l.MasterContentItem.ContentItem.Id == content.ContentItem.Id);