mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Movign to WorkContext rather that IWorkContextAccessor
This commit is contained in:
@@ -11,7 +11,7 @@ namespace TinyMce.Services {
|
||||
private readonly ICacheManager _cacheManager;
|
||||
private readonly ISignals _signals;
|
||||
private readonly IVirtualPathProvider _virtualPathProvider;
|
||||
private readonly IWorkContextAccessor _workContextAccessor;
|
||||
private readonly WorkContext _workContext;
|
||||
|
||||
private const string CacheKeyFormat = "tinymce-locales-{0}";
|
||||
private const string DefaultLanguage = "en";
|
||||
@@ -19,12 +19,12 @@ namespace TinyMce.Services {
|
||||
public TinyMceShapeDisplayEvent(
|
||||
ICacheManager cacheManager,
|
||||
IVirtualPathProvider virtualPathProvider,
|
||||
IWorkContextAccessor workContextAccessor,
|
||||
WorkContext workContext,
|
||||
ISignals signals) {
|
||||
_signals = signals;
|
||||
_cacheManager = cacheManager;
|
||||
_virtualPathProvider = virtualPathProvider;
|
||||
_workContextAccessor = workContextAccessor;
|
||||
_workContext = workContext;
|
||||
}
|
||||
|
||||
public override void Displaying(ShapeDisplayingContext context) {
|
||||
@@ -40,7 +40,7 @@ namespace TinyMce.Services {
|
||||
}
|
||||
|
||||
private string GetTinyMceLanguageIdentifier() {
|
||||
var currentCulture = CultureInfo.GetCultureInfo(_workContextAccessor.GetContext().CurrentCulture);
|
||||
var currentCulture = CultureInfo.GetCultureInfo(_workContext.CurrentCulture);
|
||||
|
||||
if (currentCulture.Name.Equals(DefaultLanguage, StringComparison.OrdinalIgnoreCase))
|
||||
return currentCulture.Name;
|
||||
|
||||
Reference in New Issue
Block a user