diff --git a/install/mods-for-hesk/js/ui-scripts.js b/install/mods-for-hesk/js/ui-scripts.js
index 158cd758..1e32489f 100644
--- a/install/mods-for-hesk/js/ui-scripts.js
+++ b/install/mods-for-hesk/js/ui-scripts.js
@@ -17,11 +17,12 @@ function startVersionUpgrade(version) {
changeTextTo('span', version, 'In Progress');
}
-function markUpdateAsSuccess(version) {
+function markUpdateAsSuccess(version, formattedVersion) {
removeSpinner(version);
$('#spinner-'+version).addClass('fa-check-circle');
changeTextTo('span', version, 'Completed Successfully');
changeRowTo('row', version, 'success');
+ appendToInstallConsole('
');
}
function removeSpinner(version) {
@@ -61,11 +62,11 @@ function changeRowTo(prefix, version, clazz) {
}
function appendToInstallConsole(text) {
- var currentText = $('#console-text').text();
- $('#console-text').append(text).append('
');
+ $('#consoleBody').append(text);
}
function installationFinished() {
+ appendToInstallConsole('
' +
'
' +
'
' +
diff --git a/install/mods-for-hesk/js/version-scripts.js b/install/mods-for-hesk/js/version-scripts.js
index 6c744f55..02e936fe 100644
--- a/install/mods-for-hesk/js/version-scripts.js
+++ b/install/mods-for-hesk/js/version-scripts.js
@@ -1,52 +1,53 @@
function processUpdates(startingVersion) {
if (startingVersion < 1) {
startVersionUpgrade('p140');
- executeUpdate(1, 'p140');
+ executeUpdate(1, 'p140', 'Pre 1.4.0');
} else if (startingVersion < 140) {
startVersionUpgrade('140');
- executeUpdate(140, '140');
+ executeUpdate(140, '140', '1.4.0');
} else if (startingVersion < 141) {
startVersionUpgrade('141');
- executeUpdate(141, '141');
+ executeUpdate(141, '141', '1.4.1');
} else if (startingVersion < 150) {
startVersionUpgrade('150');
- executeUpdate(150, '150');
+ executeUpdate(150, '150', '1.5.0');
} else if (startingVersion < 160) {
startVersionUpgrade('160');
- executeUpdate(160, '160');
+ executeUpdate(160, '160', '1.6.0');
} else if (startingVersion < 161) {
startVersionUpgrade('161');
- executeUpdate(161, '161');
+ executeUpdate(161, '161', '1.6.1');
} else if (startingVersion < 170) {
startVersionUpgrade('170');
- executeUpdate(170, '170');
+ executeUpdate(170, '170', '1.7.0');
} else if (startingVersion < 200) {
startVersionUpgrade('200');
- executeUpdate(200, '200');
+ executeUpdate(200, '200', '2.0.0');
} else if (startingVersion < 201) {
startVersionUpgrade('201');
- executeUpdate(201, '201');
+ executeUpdate(201, '201', '2.0.1');
} else {
installationFinished();
}
}
-function executeUpdate(version, cssclass) {
+function executeUpdate(version, cssclass, formattedVersion) {
+ appendToInstallConsole('
INFO | Starting updates for ' + formattedVersion + ' |
');
$.ajax({
type: 'POST',
url: 'ajax/database-ajax.php',
data: { version: version },
success: function(data) {
-
- markUpdateAsSuccess(cssclass);
+ markUpdateAsSuccess(cssclass, formattedVersion);
if (version == 200) {
migrateIpEmailBans('banmigrate', cssclass);
+ } else {
+ processUpdates(version);
}
- processUpdates(version);
},
error: function(data) {
- appendToInstallConsole('ERROR: ' + data.responseText);
+ appendToInstallConsole('ERROR | '+ data.responseText + ' |
');
markUpdateAsFailure(cssclass);
}
});
@@ -54,6 +55,7 @@ function executeUpdate(version, cssclass) {
function migrateIpEmailBans(version, cssclass) {
startVersionUpgrade(version);
+ appendToInstallConsole('INFO | Checking for IP / Email address bans to migrate |
');
$.ajax({
type: 'POST',
url: 'ajax/task-ajax.php',
@@ -62,6 +64,7 @@ function migrateIpEmailBans(version, cssclass) {
var parsedData = $.parseJSON(data);
console.info(parsedData);
if (parsedData.status == 'ATTENTION') {
+ appendToInstallConsole('WARNING | Your response is needed. Please check above. |
');
markUpdateAsAttention(version);
prepareAttentionPanel(getContentForMigratePrompt(parsedData.users));
} else {
@@ -69,7 +72,7 @@ function migrateIpEmailBans(version, cssclass) {
}
},
error: function(data) {
- appendToInstallConsole('ERROR: ' + data.responseText);
+ appendToInstallConsole('ERROR | ' + data.responseText + ' |
');
markUpdateAsFailure(cssclass);
}
});
@@ -98,7 +101,7 @@ function runMigration() {
function migrateComplete() {
$('#attention-row').hide();
- markUpdateAsSuccess('banmigrate');
+ markUpdateAsSuccess('banmigrate', 'IP and Email address bans');
processUpdates(200);
}
diff --git a/install/mods-for-hesk/modsForHeskSql.php b/install/mods-for-hesk/modsForHeskSql.php
index 1b40c493..2063a099 100644
--- a/install/mods-for-hesk/modsForHeskSql.php
+++ b/install/mods-for-hesk/modsForHeskSql.php
@@ -216,7 +216,7 @@ function execute170FileUpdate() {
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
//-- Only add the additional settings if they aren't already there.
- if (strpos($file, 'custom_field_setting') !== true)
+ if (strpos($file, 'custom_field_setting') === false)
{
$file .= '
@@ -255,7 +255,7 @@ function execute200FileUpdate() {
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
//-- Only add the additional settings if they aren't already there.
- if (strpos($file, 'html_emails') !== true)
+ if (strpos($file, 'html_emails') === false)
{
$file .= '