fixes merge issues

This commit is contained in:
Shannon
2014-02-25 02:30:05 +11:00
parent b8fe5df3c9
commit bb9c968d3a
2 changed files with 10 additions and 9 deletions

View File

@@ -333,14 +333,12 @@ namespace Umbraco.Core.Configuration
setting.Remove();
xml.Save(fileName, SaveOptions.DisableFormatting);
ConfigurationManager.RefreshSection("appSettings");
}
}
}
}
private static void SetMembershipProvidersLegacyEncoding(string providerName, bool useLegacyEncoding)
{
var webConfigFilename = GetFullWebConfigFileName();
var webConfigFilename = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root));
var webConfigXml = XDocument.Load(webConfigFilename, LoadOptions.PreserveWhitespace);
var membershipConfigs = webConfigXml.XPathSelectElements("configuration/system.web/membership/providers/add").ToList();
@@ -357,22 +355,25 @@ namespace Umbraco.Core.Configuration
webConfigXml.Save(webConfigFilename, SaveOptions.DisableFormatting);
}
private static bool ConfiguredMembershipProvidersLegacyEncoding(string providerName)
{
var webConfigFilename = GetFullWebConfigFileName();
var webConfigFilename = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root));
var webConfigXml = XDocument.Load(webConfigFilename, LoadOptions.PreserveWhitespace);
var membershipConfigs = webConfigXml.XPathSelectElements("configuration/system.web/membership/providers/add").ToList();
var provider = membershipConfigs.SingleOrDefault(c => c.Attribute("name") != null && c.Attribute("name").Value == providerName);
var useLegacyEncodingAttribute = provider.Attribute("useLegacyEncoding");
bool useLegacyEncoding;
bool.TryParse(useLegacyEncodingAttribute.Value, out useLegacyEncoding);
return useLegacyEncoding;
}
/// <summary>
/// Gets the full path to root.
/// </summary>