Database upgrade check was backwards &some more failsafes for upgrader/installer

This commit is contained in:
Sebastiaan Janssen
2013-01-07 09:39:39 -01:00
parent 759773deee
commit af4fbba8e8
4 changed files with 34 additions and 27 deletions

View File

@@ -234,16 +234,16 @@ namespace Umbraco.Core.Configuration
var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
var appSettings = xml.Root.Descendants("appSettings").Single();
var setting = appSettings.Descendants("add").FirstOrDefault(s => s.Attribute("key").Value == key);
if (setting != null)
{
setting.Remove();
xml.Save(fileName, SaveOptions.DisableFormatting);
ConfigurationManager.RefreshSection("appSettings");
xml.Save(fileName, SaveOptions.DisableFormatting);
ConfigurationManager.RefreshSection("appSettings");
}
}
private static string GetFullWebConfigFileName()
{
var webConfig = new WebConfigurationFileMap();