mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge pull request #5278 from mvarblow/1.9.x
Fix for Issue #5274 - Faulty import in SslSettingsPartDriver
This commit is contained in:
@@ -36,25 +36,8 @@ namespace Orchard.SecureSocketsLayer.Drivers {
|
||||
}
|
||||
|
||||
protected override void Importing(SslSettingsPart part, ImportContentContext context) {
|
||||
var elementName = part.PartDefinition.Name;
|
||||
part.Enabled = bool.Parse(context.Attribute(elementName, "Enabled") ?? "false");
|
||||
part.SecureEverything = bool.Parse(context.Attribute(elementName, "SecureEverything") ?? "true");
|
||||
part.CustomEnabled = bool.Parse(context.Attribute(elementName, "CustomEnabled") ?? "false");
|
||||
part.Urls = context.Attribute(elementName, "Urls") ?? "";
|
||||
part.InsecureHostName = context.Attribute(elementName, "InsecureHostName") ?? "";
|
||||
part.SecureHostName = context.Attribute(elementName, "SecureHostName") ?? "";
|
||||
|
||||
base.Importing(part, context);
|
||||
_signals.Trigger(SslSettingsPart.CacheKey);
|
||||
}
|
||||
|
||||
protected override void Exporting(SslSettingsPart part, ExportContentContext context) {
|
||||
var el = context.Element(part.PartDefinition.Name);
|
||||
el.SetAttributeValue("Enabled", part.Enabled);
|
||||
el.SetAttributeValue("SecureEverything", part.SecureEverything);
|
||||
el.SetAttributeValue("CustomEnabled", part.CustomEnabled);
|
||||
el.SetAttributeValue("Urls", part.Urls);
|
||||
el.SetAttributeValue("InsecureHostName", part.InsecureHostName);
|
||||
el.SetAttributeValue("SecureHostName", part.SecureHostName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user