Removing strong dependency on IMediaLibrary from Upgrade

This way people can upgrade to 1.7 without having to use Media Library right
away

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros 2013-07-07 11:50:04 -07:00
parent 2595b1b67d
commit 9093e77b15

View File

@ -17,15 +17,16 @@ namespace Upgrade.Controllers {
public class MediaController : Controller {
private readonly IOrchardServices _orchardServices;
private readonly IFeatureManager _featureManager;
private readonly IMediaLibraryService _mediaLibraryService;
private readonly IEnumerable<IMediaLibraryService> _mediaLibraryServices;
private IMediaLibraryService _mediaLibraryService { get { return _mediaLibraryServices.FirstOrDefault(); }}
public MediaController(
IOrchardServices orchardServices,
IFeatureManager featureManager,
IMediaLibraryService mediaLibraryService) {
IEnumerable<IMediaLibraryService> mediaLibraryServices) {
_orchardServices = orchardServices;
_featureManager = featureManager;
_mediaLibraryService = mediaLibraryService;
_mediaLibraryServices = mediaLibraryServices;
Logger = NullLogger.Instance;
}