Merge branch 'netcore/netcore' into netcore/members-userstore
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
@@ -50,6 +50,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
// get cultures - new-ing instances to get proper display name,
|
||||
// in the current culture, and not the cached one
|
||||
// (see notes in Language class about culture info names)
|
||||
// TODO: Fix this requirement, see https://github.com/umbraco/Umbraco-CMS/issues/3623
|
||||
return CultureInfo.GetCultures(CultureTypes.AllCultures)
|
||||
.Where(x => !x.Name.IsNullOrWhiteSpace())
|
||||
.Select(x => new CultureInfo(x.Name)) // important!
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc.Controllers;
|
||||
using Microsoft.AspNetCore.Mvc.Infrastructure;
|
||||
using Umbraco.Core;
|
||||
@@ -49,7 +50,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
_actionDescriptorCollectionProvider = actionDescriptorCollectionProvider;
|
||||
}
|
||||
|
||||
public IEnumerable<Section> GetSections()
|
||||
public async Task<IEnumerable<Section>> GetSections()
|
||||
{
|
||||
var sections = _sectionService.GetAllowedSections(_backofficeSecurityAccessor.BackOfficeSecurity.GetUserId().ResultOr(0));
|
||||
|
||||
@@ -74,7 +75,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
if (hasDashboards) continue;
|
||||
|
||||
// get the first tree in the section and get its root node route path
|
||||
var sectionRoot = appTreeController.GetApplicationTrees(section.Alias, null, null).Result;
|
||||
var sectionRoot = await appTreeController.GetApplicationTrees(section.Alias, null, null);
|
||||
section.RoutePath = GetRoutePathForFirstTree(sectionRoot);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user