mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
#19640 Adding Name to ImageProfilePart Import/Export
--HG-- branch : 1.x extra : source : 759d2055497c2c20741a8cefe66401217b171cba
This commit is contained in:
@@ -69,6 +69,7 @@ namespace Orchard.MediaProcessing.Drivers {
|
||||
protected override void Exporting(ImageProfilePart part, ExportContentContext context) {
|
||||
var element = context.Element(part.PartDefinition.Name);
|
||||
element.Add(
|
||||
new XAttribute("Name", part.Name),
|
||||
new XElement("Filters",
|
||||
part.Filters.Select(filter =>
|
||||
new XElement("Filter",
|
||||
@@ -86,6 +87,8 @@ namespace Orchard.MediaProcessing.Drivers {
|
||||
protected override void Importing(ImageProfilePart part, ImportContentContext context) {
|
||||
var element = context.Data.Element(part.PartDefinition.Name);
|
||||
|
||||
part.Name = element.Attribute("Name").Value;
|
||||
|
||||
var filterRecords = element.Element("Filters").Elements("Filter").Select(filter => new FilterRecord {
|
||||
Description = filter.Attribute("Description").Value,
|
||||
Category = filter.Attribute("Category").Value,
|
||||
|
||||
Reference in New Issue
Block a user