mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Update TermsPartHandler.cs
This commit is contained in:
@@ -92,8 +92,9 @@ namespace Orchard.Taxonomies.Handlers {
|
||||
// Fires off a processing engine task to run the count processing after the request so it's non-blocking.
|
||||
private void RecalculateCount(IProcessingEngine processingEngine, ShellSettings shellSettings, IShellDescriptorManager shellDescriptorManager, TermsPart part) {
|
||||
var termPartRecordIds = part.Terms.Select(t => t.TermRecord.Id).ToArray();
|
||||
processingEngine.AddTask(shellSettings, shellDescriptorManager.GetShellDescriptor(), "ITermCountProcessor.Process", new Dictionary<string, object> { { "termPartRecordIds", termPartRecordIds } });
|
||||
|
||||
if (termPartRecordIds.Length > 0) {
|
||||
processingEngine.AddTask(shellSettings, shellDescriptorManager.GetShellDescriptor(), "ITermCountProcessor.Process", new Dictionary<string, object> { { "termPartRecordIds", termPartRecordIds } });
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Activating(ActivatingContentContext context) {
|
||||
@@ -113,4 +114,4 @@ namespace Orchard.Taxonomies.Handlers {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user