Fixes: sites cannot run the new installer if they have /install directory

This commit is contained in:
perploug
2014-03-07 12:09:30 +01:00
parent 45f6d4f911
commit b816e7f4db
3 changed files with 12 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ NOTES:
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
* A new version will invalidate both client and server cache and create new persisted files
-->
<clientDependency version="394389720" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<clientDependency version="1469612626" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<!--
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.

View File

@@ -2,13 +2,14 @@
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.UI;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Persistence;
using Umbraco.Web.Install.InstallSteps;
using Umbraco.Web.Install.Models;
@@ -65,6 +66,12 @@ namespace Umbraco.Web.Install
return _installationType ?? (_installationType = IsBrandNewInstall ? InstallationType.NewInstall : InstallationType.Upgrade).Value;
}
internal void DeleteLegacyInstaller()
{
if(Directory.Exists( IOHelper.MapPath( SystemDirectories.Install )))
Directory.Move(IOHelper.MapPath(SystemDirectories.Install), IOHelper.MapPath("~/app_data/temp/install_backup"));
}
/// <summary>
/// Checks if this is a brand new install meaning that there is no configured version and there is no configured database connection
/// </summary>

View File

@@ -103,6 +103,9 @@ namespace Umbraco.Web
renderer.Initialize("Umbraco.DependencyPathRenderer", new NameValueCollection { { "compositeFileHandlerPath", "~/DependencyHandler.axd" } });
ClientDependencySettings.Instance.MvcRendererCollection.Add(renderer);
InstallHelper insHelper = new InstallHelper(UmbracoContext.Current);
insHelper.DeleteLegacyInstaller();
return this;
}