diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 20f35544c1..c76ca8e929 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -2075,6 +2075,9 @@ Designer + + Code + Web.Template.config diff --git a/src/Umbraco.Web/Editors/UpdateCheckController.cs b/src/Umbraco.Web/Editors/UpdateCheckController.cs index 6172be0243..8f159d308d 100644 --- a/src/Umbraco.Web/Editors/UpdateCheckController.cs +++ b/src/Umbraco.Web/Editors/UpdateCheckController.cs @@ -24,7 +24,7 @@ namespace Umbraco.Web.Editors { try { - var check = new global::umbraco.presentation.org.umbraco.update.CheckForUpgrade(); + var check = new org.umbraco.update.CheckForUpgrade(); var result = check.CheckUpgrade(UmbracoVersion.Current.Major, UmbracoVersion.Current.Minor, UmbracoVersion.Current.Build, diff --git a/src/Umbraco.Web/Install/Controllers/InstallController.cs b/src/Umbraco.Web/Install/Controllers/InstallController.cs index 9f60a7b748..02fc2b3511 100644 --- a/src/Umbraco.Web/Install/Controllers/InstallController.cs +++ b/src/Umbraco.Web/Install/Controllers/InstallController.cs @@ -69,6 +69,9 @@ namespace Umbraco.Web.Install.Controllers //get the base umbraco folder ViewBag.UmbracoBaseFolder = IOHelper.ResolveUrl(SystemDirectories.Umbraco); + InstallHelper ih = new InstallHelper(_umbracoContext); + ih.InstallStatus(false, ""); + //always ensure full path (see NOTE in the class remarks) return View(GlobalSettings.Path.EnsureEndsWith('/') + "install/views/index.cshtml"); } diff --git a/src/Umbraco.Web/Install/InstallHelper.cs b/src/Umbraco.Web/Install/InstallHelper.cs index 3cc39a9793..1528bd89e1 100644 --- a/src/Umbraco.Web/Install/InstallHelper.cs +++ b/src/Umbraco.Web/Install/InstallHelper.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Web; using System.Web.Script.Serialization; using System.Web.UI; +using umbraco.BusinessLogic; using Umbraco.Core; using Umbraco.Core.Configuration; using Umbraco.Core.IO; @@ -14,6 +15,7 @@ using Umbraco.Core.Persistence; using Umbraco.Web.Install.InstallSteps; using Umbraco.Web.Install.Models; + namespace Umbraco.Web.Install { internal class InstallHelper @@ -88,8 +90,50 @@ namespace Umbraco.Web.Install if (Directory.Exists(IOHelper.MapPath("~/Areas/UmbracoInstall"))) { Directory.Delete(IOHelper.MapPath("~/Areas/UmbracoInstall"), true); + } + } + + internal void InstallStatus(bool isCompleted, string errorMsg) + { + try + { + string userAgent = _umbContext.HttpContext.Request.UserAgent; + + // Check for current install Id + Guid installId = Guid.NewGuid(); + StateHelper.Cookies.Cookie installCookie = new StateHelper.Cookies.Cookie("umb_installId", 1); + if (!String.IsNullOrEmpty(installCookie.GetValue())) + { + if (Guid.TryParse(installCookie.GetValue(), out installId)) + { + // check that it's a valid Guid + if (installId == Guid.Empty) + installId = Guid.NewGuid(); + } + } + installCookie.SetValue(installId.ToString()); + + string dbProvider = String.Empty; + if (!IsBrandNewInstall) + dbProvider = ApplicationContext.Current.DatabaseContext.DatabaseProvider.ToString(); + + org.umbraco.update.CheckForUpgrade check = new org.umbraco.update.CheckForUpgrade(); + check.Install(installId, + !IsBrandNewInstall, + isCompleted, + DateTime.Now, + UmbracoVersion.Current.Major, + UmbracoVersion.Current.Minor, + UmbracoVersion.Current.Build, + UmbracoVersion.CurrentComment, + errorMsg, + userAgent, + dbProvider); + } + catch (Exception ex) + { + } - } /// diff --git a/src/Umbraco.Web/Install/InstallSteps/SetUmbracoVersionStep.cs b/src/Umbraco.Web/Install/InstallSteps/SetUmbracoVersionStep.cs index abe0d630f7..fc2fa33cc8 100644 --- a/src/Umbraco.Web/Install/InstallSteps/SetUmbracoVersionStep.cs +++ b/src/Umbraco.Web/Install/InstallSteps/SetUmbracoVersionStep.cs @@ -48,6 +48,11 @@ namespace Umbraco.Web.Install.InstallSteps //// login token from a previous version when we didn't have csrf tokens in place //var security = new WebSecurity(new HttpContextWrapper(Context), ApplicationContext.Current); //security.ClearCurrentLogin(); + + //reports the ended install + InstallHelper ih = new InstallHelper(UmbracoContext.Current); + ih.InstallStatus(true, ""); + return null; } diff --git a/src/Umbraco.Web/Web References/org.umbraco.update/Reference.cs b/src/Umbraco.Web/Web References/org.umbraco.update/Reference.cs index 6fc2e33b77..e68ae400f5 100644 --- a/src/Umbraco.Web/Web References/org.umbraco.update/Reference.cs +++ b/src/Umbraco.Web/Web References/org.umbraco.update/Reference.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18034 +// Runtime Version:4.0.30319.18444 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -9,12 +9,11 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.18034. +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.18444. // #pragma warning disable 1591 -namespace umbraco.presentation.org.umbraco.update -{ +namespace Umbraco.Web.org.umbraco.update { using System; using System.Web.Services; using System.Diagnostics; @@ -24,7 +23,7 @@ namespace umbraco.presentation.org.umbraco.update /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.18408")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="CheckForUpgradeSoap", Namespace="http://update.umbraco.org/")] @@ -181,7 +180,7 @@ namespace umbraco.presentation.org.umbraco.update } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18034")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18408")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] @@ -226,7 +225,7 @@ namespace umbraco.presentation.org.umbraco.update } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18034")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18408")] [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://update.umbraco.org/")] public enum UpgradeType { @@ -254,15 +253,15 @@ namespace umbraco.presentation.org.umbraco.update } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.18408")] public delegate void InstallCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.18408")] public delegate void CheckUpgradeCompletedEventHandler(object sender, CheckUpgradeCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.18408")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CheckUpgradeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs index bf2ea8502f..2d6beced38 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs @@ -26,8 +26,8 @@ namespace umbraco.presentation.webservices { if (!AuthorizeRequest()) return null; - var check = new global::umbraco.presentation.org.umbraco.update.CheckForUpgrade(); - org.umbraco.update.UpgradeResult result = check.CheckUpgrade(UmbracoVersion.Current.Major, + var check = new global::Umbraco.Web.org.umbraco.update.CheckForUpgrade(); + var result = check.CheckUpgrade(UmbracoVersion.Current.Major, UmbracoVersion.Current.Minor, UmbracoVersion.Current.Build, UmbracoVersion.CurrentComment); @@ -74,7 +74,7 @@ namespace umbraco.presentation.webservices if (!String.IsNullOrEmpty(global::Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus)) dbProvider = ApplicationContext.Current.DatabaseContext.DatabaseProvider.ToString(); - org.umbraco.update.CheckForUpgrade check = new global::umbraco.presentation.org.umbraco.update.CheckForUpgrade(); + var check = new global::Umbraco.Web.org.umbraco.update.CheckForUpgrade(); check.Install(installId, isUpgrade, isCompleted,