Fixes: U4-4619 Make sure installer pings stats
This commit is contained in:
@@ -2075,6 +2075,9 @@
|
||||
<Content Include="Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Views\Post.cshtml">
|
||||
<SubType>Code</SubType>
|
||||
</Content>
|
||||
<None Include="Web.Debug.config.transformed" />
|
||||
<None Include="web.Template.Debug.config">
|
||||
<DependentUpon>Web.Template.config</DependentUpon>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[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
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[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
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[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
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[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);
|
||||
|
||||
/// <remarks/>
|
||||
[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);
|
||||
|
||||
/// <remarks/>
|
||||
[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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user