Merge pull request #5278 from mvarblow/1.9.x

Fix for Issue #5274 - Faulty import in SslSettingsPartDriver
This commit is contained in:
Sébastien Ros
2015-05-14 12:58:40 -07:00

View File

@@ -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);
}
}
}
}