mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing that instead of just widgets all content items were retrieved in some WidgetsService methods
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Orchard.Widgets.Services {
|
||||
|
||||
public IEnumerable<WidgetPart> GetOrphanedWidgets() {
|
||||
return _contentManager
|
||||
.Query<WidgetPart>()
|
||||
.Query<WidgetPart, WidgetPartRecord>()
|
||||
.ForVersion(VersionOptions.Latest)
|
||||
.WithQueryHints(new QueryHints().ExpandParts<CommonPart>())
|
||||
.Where<CommonPartRecord>(x => x.Container == null)
|
||||
@@ -66,7 +66,7 @@ namespace Orchard.Widgets.Services {
|
||||
|
||||
public IEnumerable<WidgetPart> GetWidgets(int layerId) {
|
||||
return _contentManager
|
||||
.Query<WidgetPart>()
|
||||
.Query<WidgetPart, WidgetPartRecord>()
|
||||
.ForVersion(VersionOptions.Latest)
|
||||
.WithQueryHints(new QueryHints().ExpandParts<CommonPart>())
|
||||
.Where<CommonPartRecord>(x => x.Container.Id == layerId)
|
||||
|
Reference in New Issue
Block a user