mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing widget filtering
--HG-- branch : 1.x
This commit is contained in:
@@ -61,7 +61,7 @@ namespace Orchard.Widgets.Filters {
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerable<WidgetPart> widgetParts = _widgetsService.GetWidgets(activeLayerIds.ToArray());
|
||||
IEnumerable<WidgetPart> widgetParts = _widgetsService.GetWidgets(layerIds: activeLayerIds.ToArray());
|
||||
|
||||
// Build and add shape to zone.
|
||||
var zones = workContext.Layout.Zones;
|
||||
|
@@ -21,6 +21,10 @@
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -42,7 +46,6 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NHibernate, Version=3.3.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
|
@@ -2,9 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using NHibernate.Criterion;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Environment.Extensions.Models;
|
||||
using Orchard.Environment.Features;
|
||||
@@ -73,7 +71,7 @@ namespace Orchard.Widgets.Services {
|
||||
public IEnumerable<WidgetPart> GetWidgets(int[] layerIds) {
|
||||
return _contentManager
|
||||
.Query<WidgetPart, WidgetPartRecord>()
|
||||
.Where<CommonPartRecord>(x => x.Container.Id.IsIn(layerIds))
|
||||
.Where<CommonPartRecord>(x => layerIds.Contains(x.Container.Id))
|
||||
.WithQueryHints(new QueryHints().ExpandRecords<CommonPartRecord>())
|
||||
.List();
|
||||
}
|
||||
|
Reference in New Issue
Block a user