mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-27 04:19:04 +08:00
Using Invoke helper in Clone() (#7400)
This commit is contained in:
committed by
Sébastien Ros
parent
69eb505e2a
commit
fb7ba4d392
@@ -91,19 +91,13 @@ namespace Orchard.Localization.Drivers {
|
||||
private IEnumerable<LocalizationPart> GetDisplayLocalizations(LocalizationPart part, VersionOptions versionOptions) {
|
||||
return _localizationService.GetLocalizations(part.ContentItem, versionOptions)
|
||||
.Where(c => c.Culture != null)
|
||||
.Select(c => {
|
||||
var localized = c.ContentItem.As<LocalizationPart>();
|
||||
return c;
|
||||
}).ToList();
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private IEnumerable<LocalizationPart> GetEditorLocalizations(LocalizationPart part) {
|
||||
return _localizationService.GetLocalizations(part.ContentItem, VersionOptions.Latest)
|
||||
.Where(c => c.Culture != null)
|
||||
.Select(c => {
|
||||
var localized = c.ContentItem.As<LocalizationPart>();
|
||||
return c;
|
||||
}).ToList();
|
||||
.ToList();
|
||||
}
|
||||
|
||||
protected override void Importing(LocalizationPart part, ImportContentContext context) {
|
||||
|
||||
@@ -569,13 +569,10 @@ namespace Orchard.ContentManagement {
|
||||
Create(cloneContentItem, VersionOptions.Draft);
|
||||
|
||||
var context = new CloneContentContext(contentItem, cloneContentItem);
|
||||
foreach (var contentHandler in Handlers) {
|
||||
contentHandler.Cloning(context);
|
||||
}
|
||||
|
||||
foreach (var contentHandler in Handlers) {
|
||||
contentHandler.Cloned(context);
|
||||
}
|
||||
Handlers.Invoke(handler => handler.Cloning(context), Logger);
|
||||
|
||||
Handlers.Invoke(handler => handler.Cloned(context), Logger);
|
||||
|
||||
return cloneContentItem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user