mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Updating indexing tasks when content is imported or restored
This commit is contained in:
@@ -17,14 +17,13 @@ namespace Orchard.Indexing.Handlers {
|
|||||||
OnUpdated<ContentPart>(CreateIndexingTask);
|
OnUpdated<ContentPart>(CreateIndexingTask);
|
||||||
OnPublished<ContentPart>(CreateIndexingTask);
|
OnPublished<ContentPart>(CreateIndexingTask);
|
||||||
OnUnpublished<ContentPart>(CreateIndexingTask);
|
OnUnpublished<ContentPart>(CreateIndexingTask);
|
||||||
|
OnImported<ContentPart>(CreateIndexingTask);
|
||||||
|
OnRestored<ContentPart>(CreateIndexingTask);
|
||||||
OnRemoved<ContentPart>(RemoveIndexingTask);
|
OnRemoved<ContentPart>(RemoveIndexingTask);
|
||||||
|
OnDestroyed<ContentPart>(RemoveIndexingTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateIndexingTask(CreateContentContext context, ContentPart part) {
|
void CreateIndexingTask(ContentContextBase context, ContentPart part) {
|
||||||
_indexingTaskManager.CreateUpdateIndexTask(context.ContentItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CreateIndexingTask(UpdateContentContext context, ContentPart part) {
|
|
||||||
_indexingTaskManager.CreateUpdateIndexTask(context.ContentItem);
|
_indexingTaskManager.CreateUpdateIndexTask(context.ContentItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +37,7 @@ namespace Orchard.Indexing.Handlers {
|
|||||||
_indexingTaskManager.CreateUpdateIndexTask(context.ContentItem);
|
_indexingTaskManager.CreateUpdateIndexTask(context.ContentItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoveIndexingTask(RemoveContentContext context, ContentPart part) {
|
void RemoveIndexingTask(ContentContextBase context, ContentPart part) {
|
||||||
_indexingTaskManager.CreateDeleteIndexTask(context.ContentItem);
|
_indexingTaskManager.CreateDeleteIndexTask(context.ContentItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user