Refactoring installer to use the DatabaseContext for installing the umbraco db schema and default data.
Minimizing the use of the json/ajax calls during installation.
This commit is contained in:
@@ -22,12 +22,12 @@ namespace Umbraco.Core
|
||||
public class DatabaseContext
|
||||
{
|
||||
private bool _configured;
|
||||
|
||||
#region Singleton
|
||||
private static readonly Lazy<DatabaseContext> lazy = new Lazy<DatabaseContext>(() => new DatabaseContext());
|
||||
private string _connectionString;
|
||||
private string _providerName;
|
||||
|
||||
#region Singleton
|
||||
private static readonly Lazy<DatabaseContext> lazy = new Lazy<DatabaseContext>(() => new DatabaseContext());
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current Database Context.
|
||||
/// </summary>
|
||||
@@ -122,7 +122,6 @@ namespace Umbraco.Core
|
||||
|
||||
SaveConnectionString(connectionString, appSettingsConnection, providerName);
|
||||
|
||||
string appData = VirtualPathUtility.ToAbsolute(GlobalSettings.StorageDirectory);
|
||||
var path = Path.Combine(GlobalSettings.FullpathToRoot, "App_Data", "Umbraco.sdf");
|
||||
if (File.Exists(path) == false)
|
||||
{
|
||||
@@ -130,7 +129,6 @@ namespace Umbraco.Core
|
||||
engine.CreateDatabase();
|
||||
}
|
||||
|
||||
|
||||
Initialize(providerName);
|
||||
}
|
||||
|
||||
@@ -297,5 +295,32 @@ namespace Umbraco.Core
|
||||
|
||||
_configured = true;
|
||||
}
|
||||
|
||||
internal Result CreateDatabaseSchemaAndData()
|
||||
{
|
||||
var providerName = string.IsNullOrEmpty(_providerName) ? ProviderName : _providerName;
|
||||
if (_configured == false || (string.IsNullOrEmpty(_connectionString) || string.IsNullOrEmpty(providerName)))
|
||||
{
|
||||
return new Result{Message = "Database configuration is invalid", Success = false, Percentage = "10"};
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var database = new Database(_connectionString, providerName);
|
||||
database.CreateDatabaseSchema();
|
||||
return new Result { Message = "Installation completed!", Success = true, Percentage = "100" };
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new Result { Message = ex.Message, Success = false, Percentage = "90" };
|
||||
}
|
||||
}
|
||||
|
||||
internal class Result
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public bool Success { get; set; }
|
||||
public string Percentage { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,7 +124,7 @@ namespace Umbraco.Core.Persistence
|
||||
return SyntaxConfig.SqlSyntaxProvider.DoesTableExist(db, tableName);
|
||||
}
|
||||
|
||||
public static void Initialize(this Database db)
|
||||
public static void CreateDatabaseSchema(this Database db)
|
||||
{
|
||||
NewTable += PetaPocoExtensions_NewTable;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Umbraco.Tests.Persistence
|
||||
SyntaxConfig.SqlSyntaxProvider = SqlCeSyntaxProvider.Instance;
|
||||
|
||||
//Create the umbraco database
|
||||
DatabaseFactory.Current.Database.Initialize();
|
||||
DatabaseFactory.Current.Database.CreateDatabaseSchema();
|
||||
|
||||
bool umbracoNodeTable = DatabaseFactory.Current.Database.TableExist("umbracoNode");
|
||||
bool umbracoUserTable = DatabaseFactory.Current.Database.TableExist("umbracoUser");
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
//Configure the Database and Sql Syntax based on connection string set in config
|
||||
DatabaseContext.Initialize();
|
||||
//Create the umbraco database and its base data
|
||||
DatabaseContext.Database.Initialize();
|
||||
DatabaseContext.Database.CreateDatabaseSchema();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
|
||||
//Create the umbraco database
|
||||
_database = new Database(ConnectionString, ProviderName);
|
||||
_database.Initialize();
|
||||
_database.CreateDatabaseSchema();
|
||||
}
|
||||
|
||||
public abstract string ConnectionString { get; }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="umbraco.presentation.install.steps.detect"
|
||||
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="umbraco.presentation.install.steps.detect"
|
||||
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
|
||||
<%@ Import Namespace="Umbraco.Core.Configuration" %>
|
||||
<asp:PlaceHolder ID="settings" runat="server" Visible="true">
|
||||
@@ -223,37 +223,37 @@
|
||||
|
||||
switch($(this).val())
|
||||
{
|
||||
case "blank":
|
||||
case "blank":
|
||||
|
||||
$(".database-option").hide();
|
||||
$("#database-blank").show();
|
||||
$(".installbtn").show();
|
||||
$(".database-option").hide();
|
||||
$("#database-blank").show();
|
||||
$(".installbtn").show();
|
||||
|
||||
break;
|
||||
case "embedded":
|
||||
$(".database-option").hide();
|
||||
$("#database-embedded").show();
|
||||
break;
|
||||
case "embedded":
|
||||
$(".database-option").hide();
|
||||
$("#database-embedded").show();
|
||||
|
||||
if (!hasEmbeddedDlls) {
|
||||
$('.embeddedError').show();
|
||||
$(".installbtn").hide();
|
||||
}
|
||||
else {
|
||||
$('.embedded').show();
|
||||
$(".installbtn").show();
|
||||
}
|
||||
|
||||
break;
|
||||
case "advanced":
|
||||
$(".database-option").hide();
|
||||
$("#database-advanced").show();
|
||||
$(".installbtn").show();
|
||||
break;
|
||||
case "help":
|
||||
$(".database-option").hide();
|
||||
$("#database-help").show();
|
||||
if (!hasEmbeddedDlls) {
|
||||
$('.embeddedError').show();
|
||||
$(".installbtn").hide();
|
||||
break;
|
||||
}
|
||||
else {
|
||||
$('.embedded').show();
|
||||
$(".installbtn").show();
|
||||
}
|
||||
|
||||
break;
|
||||
case "advanced":
|
||||
$(".database-option").hide();
|
||||
$("#database-advanced").show();
|
||||
$(".installbtn").show();
|
||||
break;
|
||||
case "help":
|
||||
$(".database-option").hide();
|
||||
$("#database-help").show();
|
||||
$(".installbtn").hide();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -291,10 +291,38 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var intervalId = 0;
|
||||
jQuery(document).ready(function() {
|
||||
updateProgressBar("5");
|
||||
updateStatusMessage("Connecting to database..");
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
data: '{}',
|
||||
dataType: 'json',
|
||||
url: 'utills/p.aspx/installOrUpgrade',
|
||||
success: function(data) {
|
||||
var json = JSON.parse(data.d);
|
||||
|
||||
updateProgressBar(json.Percentage);
|
||||
updateStatusMessage(json.Message);
|
||||
|
||||
if (json.Success) {
|
||||
$(".btn-box").show();
|
||||
$('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
|
||||
} else {
|
||||
$(".btn-continue").hide();
|
||||
$(".btn-back").show();
|
||||
$(".btn-box").show();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*var intervalId = 0;
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
intervalId = setInterval("progressBarCallback()", 1000);
|
||||
|
||||
jQuery(".btn-box").hide();
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
@@ -303,6 +331,8 @@
|
||||
dataType: 'json',
|
||||
url: 'utills/p.aspx/installOrUpgrade'
|
||||
});
|
||||
|
||||
intervalId = setInterval("progressBarCallback()", 1000);
|
||||
});
|
||||
|
||||
function progressBarCallback() {
|
||||
@@ -326,7 +356,7 @@
|
||||
jQuery('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
|
||||
}
|
||||
});
|
||||
}
|
||||
}*/
|
||||
</script>
|
||||
|
||||
</asp:PlaceHolder>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="umbraco.presentation.install.steps.detect"
|
||||
<%@ Control Language="c#" AutoEventWireup="True" CodeBehind="database.ascx.cs" Inherits="umbraco.presentation.install.steps.detect"
|
||||
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
|
||||
<%@ Import Namespace="Umbraco.Core.Configuration" %>
|
||||
<asp:PlaceHolder ID="settings" runat="server" Visible="true">
|
||||
@@ -223,37 +223,37 @@
|
||||
|
||||
switch($(this).val())
|
||||
{
|
||||
case "blank":
|
||||
case "blank":
|
||||
|
||||
$(".database-option").hide();
|
||||
$("#database-blank").show();
|
||||
$(".installbtn").show();
|
||||
$(".database-option").hide();
|
||||
$("#database-blank").show();
|
||||
$(".installbtn").show();
|
||||
|
||||
break;
|
||||
case "embedded":
|
||||
$(".database-option").hide();
|
||||
$("#database-embedded").show();
|
||||
break;
|
||||
case "embedded":
|
||||
$(".database-option").hide();
|
||||
$("#database-embedded").show();
|
||||
|
||||
if (!hasEmbeddedDlls) {
|
||||
$('.embeddedError').show();
|
||||
$(".installbtn").hide();
|
||||
}
|
||||
else {
|
||||
$('.embedded').show();
|
||||
$(".installbtn").show();
|
||||
}
|
||||
|
||||
break;
|
||||
case "advanced":
|
||||
$(".database-option").hide();
|
||||
$("#database-advanced").show();
|
||||
$(".installbtn").show();
|
||||
break;
|
||||
case "help":
|
||||
$(".database-option").hide();
|
||||
$("#database-help").show();
|
||||
if (!hasEmbeddedDlls) {
|
||||
$('.embeddedError').show();
|
||||
$(".installbtn").hide();
|
||||
break;
|
||||
}
|
||||
else {
|
||||
$('.embedded').show();
|
||||
$(".installbtn").show();
|
||||
}
|
||||
|
||||
break;
|
||||
case "advanced":
|
||||
$(".database-option").hide();
|
||||
$("#database-advanced").show();
|
||||
$(".installbtn").show();
|
||||
break;
|
||||
case "help":
|
||||
$(".database-option").hide();
|
||||
$("#database-help").show();
|
||||
$(".installbtn").hide();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -291,42 +291,33 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var intervalId = 0;
|
||||
jQuery(document).ready(function() {
|
||||
updateProgressBar("5");
|
||||
updateStatusMessage("Connecting to database..");
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
intervalId = setInterval("progressBarCallback()", 1000);
|
||||
jQuery(".btn-box").hide();
|
||||
jQuery.ajax({
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
data: '{}',
|
||||
dataType: 'json',
|
||||
url: 'utills/p.aspx/installOrUpgrade'
|
||||
url: 'utills/p.aspx/installOrUpgrade',
|
||||
success: function(data) {
|
||||
var json = JSON.parse(data.d);
|
||||
|
||||
updateProgressBar(json.Percentage);
|
||||
updateStatusMessage(json.Message);
|
||||
|
||||
if (json.Success) {
|
||||
$(".btn-box").show();
|
||||
$('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
|
||||
} else {
|
||||
$(".btn-continue").hide();
|
||||
$(".btn-back").show();
|
||||
$(".btn-box").show();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function progressBarCallback() {
|
||||
jQuery.getJSON('utills/p.aspx?feed=progress', function (data) {
|
||||
|
||||
updateProgressBar(data.Percentage);
|
||||
updateStatusMessage(data.Description);
|
||||
|
||||
if (data.Error != "") {
|
||||
clearInterval(intervalId);
|
||||
updateStatusMessage(jQuery(".loader > strong").text(), data.Error);
|
||||
|
||||
jQuery(".btn-continue").hide();
|
||||
jQuery(".btn-back").show();
|
||||
jQuery(".btn-box").show();
|
||||
}
|
||||
|
||||
if (data.Percentage == 100) {
|
||||
clearInterval(intervalId);
|
||||
jQuery(".btn-box").show();
|
||||
jQuery('.ui-progressbar-value').css("background-image", "url(../umbraco_client/installer/images/pbar.gif)");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:PlaceHolder>
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using System;
|
||||
using System.Data.Common;
|
||||
using System.Threading;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Persistence;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco.DataLayer.Utility.Installer;
|
||||
using System.IO;
|
||||
using umbraco.IO;
|
||||
|
||||
@@ -18,29 +14,6 @@ namespace umbraco.presentation.install.steps
|
||||
/// </summary>
|
||||
public partial class detect : System.Web.UI.UserControl
|
||||
{
|
||||
/// <summary>The installer associated with the chosen connection string.</summary>
|
||||
private IInstallerUtility m_Installer;
|
||||
|
||||
/// <summary>
|
||||
/// The installer associated with the chosen connection string.
|
||||
/// Will be initialized if <c>m_Installer</c> is <c>null</c>.
|
||||
/// </summary>
|
||||
protected IInstallerUtility Installer
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Installer == null)
|
||||
m_Installer = SqlHelper.Utility.CreateInstaller();
|
||||
return m_Installer;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns the current SQLHelper.</summary>
|
||||
protected static ISqlHelper SqlHelper
|
||||
{
|
||||
get { return BusinessLogic.Application.SqlHelper; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether the selected database is an embedded database.
|
||||
/// </summary>
|
||||
@@ -154,13 +127,8 @@ namespace umbraco.presentation.install.steps
|
||||
/// </summary>
|
||||
protected void saveDBConfig(object sender, EventArgs e)
|
||||
{
|
||||
Helper.setProgress(5, "Saving database connection...", "");
|
||||
|
||||
try
|
||||
{
|
||||
/*DbConnectionStringBuilder connectionStringBuilder = CreateConnectionString();
|
||||
GlobalSettings.DbDSN = connectionStringBuilder.ConnectionString;*/
|
||||
|
||||
if (string.IsNullOrEmpty(ConnectionString.Text) == false)
|
||||
{
|
||||
DatabaseContext.Current.ConfigureDatabaseConnection(ConnectionString.Text);
|
||||
@@ -175,70 +143,16 @@ namespace umbraco.presentation.install.steps
|
||||
DatabaseUsername.Text, DatabasePassword.Text,
|
||||
DatabaseType.SelectedValue);
|
||||
}
|
||||
|
||||
var database = new Database(DatabaseContext.Current.ConnectionString,
|
||||
DatabaseContext.Current.ProviderName);
|
||||
|
||||
database.Initialize();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error<detect>("Exception was thrown during the setup of the database in 'saveDBConfig'.", ex);
|
||||
|
||||
Exception error = new Exception("Could not save the web.config file. Please modify the connection string manually.", ex);
|
||||
Helper.setProgress(-1, "Could not save the web.config file. Please modify the connection string manually.", error.InnerException.Message);
|
||||
}
|
||||
|
||||
Thread.Sleep(5000);
|
||||
|
||||
|
||||
settings.Visible = false;
|
||||
installing.Visible = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the connection string with the values the user has supplied.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected DbConnectionStringBuilder CreateConnectionString()
|
||||
{
|
||||
DbConnectionStringBuilder connectionStringBuilder = new DbConnectionStringBuilder();
|
||||
|
||||
if (ManualConnectionString)
|
||||
{
|
||||
connectionStringBuilder.ConnectionString = ConnectionString.Text;
|
||||
}
|
||||
else if (!IsEmbeddedDatabase && !DatabaseType.SelectedValue.Contains("SqlAzure"))//If database is not embedded or of type Sql Azure
|
||||
{
|
||||
connectionStringBuilder["server"] = DatabaseServer.Text;
|
||||
connectionStringBuilder["database"] = DatabaseName.Text;
|
||||
connectionStringBuilder["user id"] = DatabaseUsername.Text;
|
||||
connectionStringBuilder["password"] = DatabasePassword.Text;
|
||||
}
|
||||
else if (!IsEmbeddedDatabase && DatabaseType.SelectedValue.Contains("SqlAzure"))//If database is not embedded and of type Sql Azure
|
||||
{
|
||||
connectionStringBuilder.ConnectionString =
|
||||
string.Format("Server=tcp:{0}.database.windows.net;Database={1};User ID={2}@{0};Password={3}",
|
||||
DatabaseServer.Text, DatabaseName.Text, DatabaseUsername.Text, DatabasePassword.Text);
|
||||
}
|
||||
else if (Request["database"] == "embedded")
|
||||
{
|
||||
connectionStringBuilder.ConnectionString = @"datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;data source=|DataDirectory|\Umbraco.sdf";
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(Request["database"]) && !String.IsNullOrEmpty(DatabaseType.SelectedValue)
|
||||
&& !DatabaseType.SelectedValue.Contains("SqlServer")
|
||||
&& !DatabaseType.SelectedValue.Contains("SqlAzure")
|
||||
&& Request["database"] != "advanced")
|
||||
{
|
||||
connectionStringBuilder["datalayer"] = DatabaseType.SelectedValue;
|
||||
}
|
||||
|
||||
//if (!String.IsNullOrEmpty(DatabaseType.SelectedValue) && !DatabaseType.SelectedValue.Contains("SqlServer") && !DatabaseType.SelectedValue.Contains("Custom"))
|
||||
// connectionStringBuilder["datalayer"] = DatabaseType.SelectedValue;
|
||||
|
||||
return connectionStringBuilder;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value of the specified item in the connection string.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.Script.Serialization;
|
||||
using System.Web.Script.Services;
|
||||
using System.Web.Services;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Persistence;
|
||||
using umbraco.DataLayer.Utility.Installer;
|
||||
using umbraco.DataLayer;
|
||||
|
||||
namespace umbraco.presentation.install.utills
|
||||
{
|
||||
@@ -58,103 +52,17 @@ namespace umbraco.presentation.install.utills
|
||||
}
|
||||
|
||||
|
||||
[System.Web.Services.WebMethod]
|
||||
[System.Web.Script.Services.ScriptMethod]
|
||||
[WebMethod]
|
||||
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
|
||||
public static string installOrUpgrade()
|
||||
{
|
||||
LogHelper.Info<p>("Running 'installOrUpgrade' service");
|
||||
|
||||
//Helper.setProgress(5, "Opening database connection...", "");
|
||||
//IInstallerUtility installer;
|
||||
var result = DatabaseContext.Current.CreateDatabaseSchemaAndData();
|
||||
|
||||
if (DatabaseContext.Current.IsDatabaseConfigured == false)
|
||||
return "ConnectionString could not be found";
|
||||
|
||||
//Helper.setProgress(20, "Connection opened", "");
|
||||
|
||||
//var database = new Database(DatabaseContext.Current.ConnectionString, DatabaseContext.Current.ProviderName);
|
||||
|
||||
//Helper.setProgress(35, "Installing tables...", "");
|
||||
|
||||
//database.Initialize();
|
||||
|
||||
//Helper.setProgress(90, "Refreshing content cache", "");
|
||||
|
||||
//library.RefreshContent();
|
||||
|
||||
Helper.setProgress(100, "Installation completed!", "");
|
||||
|
||||
return "installed";
|
||||
|
||||
/*try
|
||||
{
|
||||
var sqlHelper = DataLayerHelper.CreateSqlHelper(GlobalSettings.DbDSN);
|
||||
installer = sqlHelper.Utility.CreateInstaller();
|
||||
|
||||
if (!installer.CanConnect)
|
||||
throw new Exception("The installer cannot connect to the database.");
|
||||
else
|
||||
Helper.setProgress(20, "Connection opened", "");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var error = new Exception("Database connection initialisation failed.", ex);
|
||||
Helper.setProgress(-5, "Database connection initialisation failed.",
|
||||
string.Format("{0}<br />Connection string: {1}", error.InnerException.Message, GlobalSettings.DbDSN));
|
||||
|
||||
return error.Message;
|
||||
}*/
|
||||
|
||||
|
||||
/*if (installer.CanConnect)
|
||||
{
|
||||
if (installer.IsLatestVersion)
|
||||
{
|
||||
|
||||
Helper.setProgress(90, "Refreshing content cache", "");
|
||||
|
||||
library.RefreshContent();
|
||||
|
||||
Helper.setProgress(100, "Database is up-to-date", "");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (installer.IsEmpty)
|
||||
{
|
||||
Helper.setProgress(35, "Installing tables...", "");
|
||||
try
|
||||
{
|
||||
installer.Install();
|
||||
Helper.setProgress(100, "Installation completed!", "");
|
||||
installer = null;
|
||||
|
||||
library.RefreshContent();
|
||||
return "installed";
|
||||
}
|
||||
catch (Exception SqlExp)
|
||||
{
|
||||
Helper.setProgress(35, "Error installing tables", SqlExp.InnerException.ToString());
|
||||
return "error";
|
||||
}
|
||||
|
||||
}
|
||||
else if (installer.CurrentVersion == DatabaseVersion.None || installer.CanUpgrade)
|
||||
{
|
||||
Helper.setProgress(35, "Updating database tables...", "");
|
||||
installer.Install();
|
||||
|
||||
Helper.setProgress(100, "Upgrade completed!", "");
|
||||
|
||||
installer = null;
|
||||
|
||||
library.RefreshContent();
|
||||
return "upgraded";
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return "no connection;";
|
||||
var js = new JavaScriptSerializer();
|
||||
var jsonResult = js.Serialize(result);
|
||||
return jsonResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user