diff --git a/src/Umbraco.Web.UI/install/default.aspx b/src/Umbraco.Web.UI/install/default.aspx index 2d0acda187..9e5f9056da 100644 --- a/src/Umbraco.Web.UI/install/default.aspx +++ b/src/Umbraco.Web.UI/install/default.aspx @@ -11,7 +11,7 @@ - + " /> @@ -40,7 +40,11 @@
- + + + + +
diff --git a/src/Umbraco.Web.UI/install/steps/theend.ascx b/src/Umbraco.Web.UI/install/steps/theend.ascx index 61c6fd86cb..f9c6f30107 100644 --- a/src/Umbraco.Web.UI/install/steps/theend.ascx +++ b/src/Umbraco.Web.UI/install/steps/theend.ascx @@ -12,6 +12,9 @@ jQuery(document).ready(function () { function (data) { jQuery("#ajax-developervids").html(data); }); + + umbraco.presentation.webservices.CheckForUpgrade.InstallStatus(true, navigator.userAgent, ""); + }); diff --git a/src/Umbraco.Web.UI/install/steps/welcome.ascx b/src/Umbraco.Web.UI/install/steps/welcome.ascx index 18f24a143d..a0ce00d7f1 100644 --- a/src/Umbraco.Web.UI/install/steps/welcome.ascx +++ b/src/Umbraco.Web.UI/install/steps/welcome.ascx @@ -47,4 +47,9 @@ Let's get started! - \ No newline at end of file + + \ No newline at end of file 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 87a309f714..c6a3c0dc17 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.544 +// Runtime Version:4.0.30319.18033 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -9,27 +9,28 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.544. +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.18033. // #pragma warning disable 1591 -namespace umbraco.presentation.org.umbraco.update -{ +namespace umbraco.presentation.org.umbraco.update { using System; using System.Web.Services; using System.Diagnostics; using System.Web.Services.Protocols; - using System.ComponentModel; using System.Xml.Serialization; + using System.ComponentModel; /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="CheckForUpgradeSoap", Namespace="http://update.umbraco.org/")] public partial class CheckForUpgrade : System.Web.Services.Protocols.SoapHttpClientProtocol { + private System.Threading.SendOrPostCallback InstallOperationCompleted; + private System.Threading.SendOrPostCallback CheckUpgradeOperationCompleted; private bool useDefaultCredentialsSetExplicitly; @@ -70,34 +71,85 @@ namespace umbraco.presentation.org.umbraco.update } } + /// + public event InstallCompletedEventHandler InstallCompleted; + /// public event CheckUpgradeCompletedEventHandler CheckUpgradeCompleted; + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://update.umbraco.org/Install", RequestNamespace="http://update.umbraco.org/", ResponseNamespace="http://update.umbraco.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void Install(System.Guid installId, bool isUpgrade, bool installCompleted, System.DateTime timestamp, int versionMajor, int versionMinor, int versionPatch, string versionComment, string error, string userAgent, string dbProvider) { + this.Invoke("Install", new object[] { + installId, + isUpgrade, + installCompleted, + timestamp, + versionMajor, + versionMinor, + versionPatch, + versionComment, + error, + userAgent, + dbProvider}); + } + + /// + public void InstallAsync(System.Guid installId, bool isUpgrade, bool installCompleted, System.DateTime timestamp, int versionMajor, int versionMinor, int versionPatch, string versionComment, string error, string userAgent, string dbProvider) { + this.InstallAsync(installId, isUpgrade, installCompleted, timestamp, versionMajor, versionMinor, versionPatch, versionComment, error, userAgent, dbProvider, null); + } + + /// + public void InstallAsync(System.Guid installId, bool isUpgrade, bool installCompleted, System.DateTime timestamp, int versionMajor, int versionMinor, int versionPatch, string versionComment, string error, string userAgent, string dbProvider, object userState) { + if ((this.InstallOperationCompleted == null)) { + this.InstallOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallOperationCompleted); + } + this.InvokeAsync("Install", new object[] { + installId, + isUpgrade, + installCompleted, + timestamp, + versionMajor, + versionMinor, + versionPatch, + versionComment, + error, + userAgent, + dbProvider}, this.InstallOperationCompleted, userState); + } + + private void OnInstallOperationCompleted(object arg) { + if ((this.InstallCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.InstallCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://update.umbraco.org/CheckUpgrade", RequestNamespace="http://update.umbraco.org/", ResponseNamespace="http://update.umbraco.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public UpgradeResult CheckUpgrade(int VersionMajor, int VersionMinor, int VersionPatch, string versionComment) { + public UpgradeResult CheckUpgrade(int versionMajor, int versionMinor, int versionPatch, string versionComment) { object[] results = this.Invoke("CheckUpgrade", new object[] { - VersionMajor, - VersionMinor, - VersionPatch, + versionMajor, + versionMinor, + versionPatch, versionComment}); return ((UpgradeResult)(results[0])); } /// - public void CheckUpgradeAsync(int VersionMajor, int VersionMinor, int VersionPatch, string versionComment) { - this.CheckUpgradeAsync(VersionMajor, VersionMinor, VersionPatch, versionComment, null); + public void CheckUpgradeAsync(int versionMajor, int versionMinor, int versionPatch, string versionComment) { + this.CheckUpgradeAsync(versionMajor, versionMinor, versionPatch, versionComment, null); } /// - public void CheckUpgradeAsync(int VersionMajor, int VersionMinor, int VersionPatch, string versionComment, object userState) { + public void CheckUpgradeAsync(int versionMajor, int versionMinor, int versionPatch, string versionComment, object userState) { if ((this.CheckUpgradeOperationCompleted == null)) { this.CheckUpgradeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckUpgradeOperationCompleted); } this.InvokeAsync("CheckUpgrade", new object[] { - VersionMajor, - VersionMinor, - VersionPatch, + versionMajor, + versionMinor, + versionPatch, versionComment}, this.CheckUpgradeOperationCompleted, userState); } @@ -128,28 +180,18 @@ namespace umbraco.presentation.org.umbraco.update } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.450")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18033")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://update.umbraco.org/")] public partial class UpgradeResult { - private UpgradeType upgradeTypeField; - private string commentField; - private string upgradeUrlField; + private UpgradeType upgradeTypeField; - /// - public UpgradeType UpgradeType { - get { - return this.upgradeTypeField; - } - set { - this.upgradeTypeField = value; - } - } + private string upgradeUrlField; /// public string Comment { @@ -161,6 +203,16 @@ namespace umbraco.presentation.org.umbraco.update } } + /// + public UpgradeType UpgradeType { + get { + return this.upgradeTypeField; + } + set { + this.upgradeTypeField = value; + } + } + /// public string UpgradeUrl { get { @@ -173,7 +225,7 @@ namespace umbraco.presentation.org.umbraco.update } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.450")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18033")] [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://update.umbraco.org/")] public enum UpgradeType { @@ -201,11 +253,15 @@ namespace umbraco.presentation.org.umbraco.update } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void InstallCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] public delegate void CheckUpgradeCompletedEventHandler(object sender, CheckUpgradeCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CheckUpgradeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { diff --git a/src/Umbraco.Web/Web References/org.umbraco.update/Reference.map b/src/Umbraco.Web/Web References/org.umbraco.update/Reference.map index a0cba8d88b..dc2f3d1d64 100644 --- a/src/Umbraco.Web/Web References/org.umbraco.update/Reference.map +++ b/src/Umbraco.Web/Web References/org.umbraco.update/Reference.map @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/src/Umbraco.Web/Web References/org.umbraco.update/checkforupgrade.wsdl b/src/Umbraco.Web/Web References/org.umbraco.update/checkforupgrade.wsdl index 9661c33653..5c700af0bb 100644 --- a/src/Umbraco.Web/Web References/org.umbraco.update/checkforupgrade.wsdl +++ b/src/Umbraco.Web/Web References/org.umbraco.update/checkforupgrade.wsdl @@ -1,13 +1,34 @@ - + + + + + + + + + + + + + + + + + + + + + + - - - + + + @@ -21,8 +42,8 @@ - + @@ -38,7 +59,20 @@ + + + + + + + + + + + + + @@ -46,6 +80,10 @@ + + + + @@ -53,6 +91,15 @@ + + + + + + + + + @@ -65,6 +112,15 @@ + + + + + + + + + diff --git a/src/Umbraco.Web/umbraco.presentation/install/steps/theend.ascx b/src/Umbraco.Web/umbraco.presentation/install/steps/theend.ascx index 61c6fd86cb..f9c6f30107 100644 --- a/src/Umbraco.Web/umbraco.presentation/install/steps/theend.ascx +++ b/src/Umbraco.Web/umbraco.presentation/install/steps/theend.ascx @@ -12,6 +12,9 @@ jQuery(document).ready(function () { function (data) { jQuery("#ajax-developervids").html(data); }); + + umbraco.presentation.webservices.CheckForUpgrade.InstallStatus(true, navigator.userAgent, ""); + }); diff --git a/src/Umbraco.Web/umbraco.presentation/install/steps/welcome.ascx b/src/Umbraco.Web/umbraco.presentation/install/steps/welcome.ascx index 18f24a143d..a0ce00d7f1 100644 --- a/src/Umbraco.Web/umbraco.presentation/install/steps/welcome.ascx +++ b/src/Umbraco.Web/umbraco.presentation/install/steps/welcome.ascx @@ -47,4 +47,9 @@ Let's get started! - \ No newline at end of file + + \ No newline at end of file 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 f06a7e43c7..7c4e000047 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Web; using System.Web.Services; using System.Web.Script.Services; +using Umbraco.Core; using Umbraco.Core.Configuration; @@ -32,7 +33,50 @@ namespace umbraco.presentation.webservices return new UpgradeResult(result.UpgradeType.ToString(), result.Comment, result.UpgradeUrl); } + [WebMethod] + [ScriptMethod] + public void InstallStatus(bool isCompleted, string userAgent, string errorMsg) + { + bool isUpgrade = false; + // if it's an upgrade, you'll need to be logged in before we allow this call + if (!String.IsNullOrEmpty(Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus)) + { + isUpgrade = true; + legacyAjaxCalls.Authorize(); + } + + // Check for current install Id + Guid installId = Guid.NewGuid(); + BusinessLogic.StateHelper.Cookies.Cookie installCookie = + new BusinessLogic.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()); + + org.umbraco.update.CheckForUpgrade check = new global::umbraco.presentation.org.umbraco.update.CheckForUpgrade(); + check.Install(installId, + isUpgrade, + isCompleted, + DateTime.Now, + UmbracoVersion.Current.Major, + UmbracoVersion.Current.Minor, + UmbracoVersion.Current.Build, + UmbracoVersion.CurrentComment, + errorMsg, + userAgent, + ApplicationContext.Current.DatabaseContext.DatabaseProvider.ToString()); + } } + + public class UpgradeResult { public string UpgradeType { get; set; }