mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Remove ArchiveLaterTask if content item is deleted (#8308)
This commit is contained in:
committed by
Sébastien Ros
parent
d94d50f67d
commit
0469c3a2fd
@@ -11,10 +11,12 @@ namespace Orchard.ArchiveLater.Handlers {
|
||||
|
||||
OnLoading<ArchiveLaterPart>((context, part) => LazyLoadHandlers(part));
|
||||
OnVersioning<ArchiveLaterPart>((context, part, newVersionPart) => LazyLoadHandlers(newVersionPart));
|
||||
OnRemoved<ArchiveLaterPart>((context, part) => _archiveLaterService.RemoveArchiveLaterTasks(part.ContentItem));
|
||||
OnDestroyed<ArchiveLaterPart>((context, part) => _archiveLaterService.RemoveArchiveLaterTasks(part.ContentItem));
|
||||
}
|
||||
|
||||
protected void LazyLoadHandlers(ArchiveLaterPart part) {
|
||||
part.ScheduledArchiveUtc.Loader(() => _archiveLaterService.GetScheduledArchiveUtc(part));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user