diff --git a/install/mods-for-hesk/installModsForHesk.php b/install/mods-for-hesk/installModsForHesk.php
index 8523894a..2849c227 100644
--- a/install/mods-for-hesk/installModsForHesk.php
+++ b/install/mods-for-hesk/installModsForHesk.php
@@ -69,31 +69,33 @@ function printRow($version) {
Installation Progress
-
-
-
- Version |
- Status |
-
-
-
+
+
+
+
+
+ Task |
+ Status |
+
+
+
+
+ Migrate IP / Email Bans |
+ Waiting... |
+
+
+
+
diff --git a/js/modsForHesk-javascript.js b/js/modsForHesk-javascript.js
index 04100faa..62c911bd 100644
--- a/js/modsForHesk-javascript.js
+++ b/js/modsForHesk-javascript.js
@@ -136,7 +136,7 @@ function appendToInstallConsole(text) {
function processUpdates(startingVersion) {
if (startingVersion < 1) {
startVersionUpgrade('p140');
- executeUpdate(1000, 'p140');
+ executeUpdate(1, 'p140');
} else if (startingVersion < 140) {
startVersionUpgrade('140');
executeUpdate(140, '140');
@@ -194,7 +194,7 @@ function migrateIpEmailBans(version, cssclass) {
markUpdateAsAttention(version);
prepareAttentionPanel(getContentForMigratePrompt(parsedData.users));
} else {
- markUpdateAsSuccess(version);
+ migrateComplete();
}
//if ask user, markUpdateAsAttention and append to Attention! div
//otherwise, mark success and move to completion script.
@@ -206,6 +206,11 @@ function migrateIpEmailBans(version, cssclass) {
});
}
+function installationFinished() {
+ var html = 'Hey! We finished!
';
+ $('#install-information').html(html);
+}
+
function getContentForMigratePrompt(users) {
var beginningText = 'Migrating IP / E-mail Bans
Mods for HESK has detected that you have added IP address ' +
'and/or email bans using Mods for HESK. As part of the upgrade process, Mods for HESK will migrate these bans ' +
@@ -218,7 +223,7 @@ function getContentForMigratePrompt(users) {
});
selectMarkup += '
';
var submitMarkup = '
';
+ 'Don\'t Migrate ';
return beginningText + selectMarkup + submitMarkup;
}
@@ -239,8 +244,7 @@ function runMigration() {
url: 'ajax/task-ajax.php',
data: { task: 'migrate-bans', user: userId },
success: function(data) {
- markUpdateAsSuccess('banmigrate');
- //TODO cover entire install area with success message.
+ migrateComplete();
},
error: function(data) {
appendToInstallConsole('ERROR: ' + data.responseText);
@@ -249,4 +253,10 @@ function runMigration() {
})
}
+function migrateComplete() {
+ $('#attention-row').hide();
+ markUpdateAsSuccess('banmigrate');
+ installationFinished();
+}
+
jQuery(document).ready(loadJquery);