Fixed Media Library not showing draft items.

Due to a bad merge (1.7.x into 1.x), the VersionOptions weren't being specified anymore, which caused the Media Library to not show draft items.
This commit is contained in:
Sipke Schoorstra
2014-03-21 12:23:02 +01:00
parent 878f45ad86
commit 0a970e88f3
@@ -90,8 +90,8 @@ namespace Orchard.MediaLibrary.Controllers {
if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent, T("Cannot view media")))
return new HttpUnauthorizedResult();
var mediaParts = _mediaLibraryService.GetMediaContentItems(folderPath, skip, count, order, mediaType);
var mediaPartsCount = _mediaLibraryService.GetMediaContentItemsCount(folderPath, mediaType);
var mediaParts = _mediaLibraryService.GetMediaContentItems(folderPath, skip, count, order, mediaType, VersionOptions.Latest);
var mediaPartsCount = _mediaLibraryService.GetMediaContentItemsCount(folderPath, mediaType, VersionOptions.Latest);
var mediaItems = mediaParts.Select(x => new MediaManagerMediaItemViewModel {
MediaPart = x,