From cb33442e7c5e6d274cf81afd7f3957310635ebec Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Sat, 9 Feb 2019 17:50:29 +0100 Subject: [PATCH] Tidy up a bit --- src/Umbraco.Web/Editors/EntityController.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index ad750c3b53..842f22bda2 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -503,7 +503,7 @@ namespace Umbraco.Web.Editors return new PagedResult(0, 0, 0); } - var culture = Request.ClientCulture(); + var culture = ClientCulture(); var pagedResult = new PagedResult(totalRecords, pageNumber, pageSize) { Items = entities.Select(entity => Mapper.Map(entity, options => @@ -1045,16 +1045,18 @@ namespace Umbraco.Web.Editors private Func MapEntities(string culture = null) { - culture = culture ?? Request.ClientCulture(); + culture = culture ?? ClientCulture(); return x => MapEntity(x, culture); } private EntityBasic MapEntity(object entity, string culture = null) { - culture = culture ?? Request.ClientCulture(); + culture = culture ?? ClientCulture(); return Mapper.Map(entity, opts => { opts.SetCulture(culture); }); } + private string ClientCulture() => Request.ClientCulture(); + #region Methods to get all dictionary items private IEnumerable GetAllDictionaryItems() {