From 92ea19e47c9a2a8def4c068f4a20a5689bfced0f Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Sun, 8 Mar 2015 00:09:24 -0500 Subject: [PATCH] Update installer to 2.0.1 --- README.md | 2 +- install/install_functions.inc.php | 2 +- install/mods-for-hesk/ajax/database-ajax.php | 2 ++ install/mods-for-hesk/installModsForHesk.php | 33 +++++++++++--------- install/mods-for-hesk/modsForHesk.php | 33 +++++++++++++------- install/mods-for-hesk/modsForHeskSql.php | 11 ++++++- install/mods-for-hesk/updateTo2-0-0.php | 33 -------------------- js/modsForHesk-javascript.js | 9 ++++-- 8 files changed, 62 insertions(+), 63 deletions(-) delete mode 100644 install/mods-for-hesk/updateTo2-0-0.php diff --git a/README.md b/README.md index 12177ef1..428c5f5e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## [Mods for HESK](http://mods-for-hesk.mkochcs.com) v2.0.0 +## [Mods for HESK](http://mods-for-hesk.mkochcs.com) v2.0.1 [![Stories in Ready](https://badge.waffle.io/mkoch227/Mods-For-Hesk.png?label=waffle:ready&title=Ready)](https://waffle.io/mkoch227/Mods-For-Hesk) [![Join the chat at https://gitter.im/mkoch227/Mods-for-HESK](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mkoch227/Mods-for-HESK?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) diff --git a/install/install_functions.inc.php b/install/install_functions.inc.php index 77cbac28..1fa0fd83 100644 --- a/install/install_functions.inc.php +++ b/install/install_functions.inc.php @@ -37,7 +37,7 @@ if (!defined('IN_SCRIPT')) {die('Invalid attempt');} // We will be installing this HESK version: define('HESK_NEW_VERSION','2.6.0'); -define('MODS_FOR_HESK_NEW_VERSION','2.0.0'); +define('MODS_FOR_HESK_NEW_VERSION','2.0.1'); define('REQUIRE_PHP_VERSION','5.0.0'); define('REQUIRE_MYSQL_VERSION','5.0.7'); diff --git a/install/mods-for-hesk/ajax/database-ajax.php b/install/mods-for-hesk/ajax/database-ajax.php index 81c74c62..df5727ec 100644 --- a/install/mods-for-hesk/ajax/database-ajax.php +++ b/install/mods-for-hesk/ajax/database-ajax.php @@ -25,6 +25,8 @@ if ($version == 1) { } elseif ($version == 200) { execute200Scripts(); execute200FileUpdate(); +} elseif ($version == 201) { + execute201Scripts(); } else { $response = 'The version "'.$version.'" was not recognized. Check the value submitted and try again.'; print $response; diff --git a/install/mods-for-hesk/installModsForHesk.php b/install/mods-for-hesk/installModsForHesk.php index 2849c227..16eba7a0 100644 --- a/install/mods-for-hesk/installModsForHesk.php +++ b/install/mods-for-hesk/installModsForHesk.php @@ -34,6 +34,9 @@ function echoInitialVersionRows($version) { if ($version < 200) { printRow('v2.0.0'); } + if ($version < 201) { + printRow('v2.0.1'); + } } function printRow($version) { @@ -81,20 +84,22 @@ function printRow($version) { - - - - - - - - - - - - - -
TaskStatus
Migrate IP / Email Bans Waiting...
+ + + + + + + + + + + + + + +
TaskStatus
Migrate IP / Email Bans Waiting...
+ diff --git a/install/mods-for-hesk/modsForHesk.php b/install/mods-for-hesk/modsForHesk.php index e085f44e..a00afe7c 100644 --- a/install/mods-for-hesk/modsForHesk.php +++ b/install/mods-for-hesk/modsForHesk.php @@ -8,7 +8,7 @@ hesk_dbConnect(); ?> - Mods For HESK 2.0.0 Install / Upgrade + Mods For HESK 2.0.1 Install / Upgrade @@ -20,10 +20,10 @@ hesk_dbConnect(); -
Mods for HESK 2.0.0 Install / Upgrade
+
Mods for HESK 2.0.1 Install / Upgrade
+
+ + v2.0.0 +
-
- v1.5.0 -

+
+ v1.5.0 +
@@ -184,14 +195,14 @@ hesk_dbConnect(); -
- v1.2.4 -

-
diff --git a/install/mods-for-hesk/modsForHeskSql.php b/install/mods-for-hesk/modsForHeskSql.php index 6bc886c6..1b40c493 100644 --- a/install/mods-for-hesk/modsForHeskSql.php +++ b/install/mods-for-hesk/modsForHeskSql.php @@ -319,4 +319,13 @@ function migrateBans($creator) { executeQuery("DROP TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_ips`"); executeQuery("DROP TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_emails`"); } -// END Version 2.0.0 \ No newline at end of file +// END Version 2.0.0 + +// BEGIN Version 2.0.1 +function execute201Scripts() { + global $hesk_settings; + + hesk_dbConnect(); + executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.0.1' WHERE `Key` = 'modsForHeskVersion'"); +} +// END Version 2.0.1 \ No newline at end of file diff --git a/install/mods-for-hesk/updateTo2-0-0.php b/install/mods-for-hesk/updateTo2-0-0.php deleted file mode 100644 index 43866610..00000000 --- a/install/mods-for-hesk/updateTo2-0-0.php +++ /dev/null @@ -1,33 +0,0 @@ - 0) -{ - $usersRS = hesk_dbQuery("SELECT `id`, `name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `active` = '1' ORDER BY `name`"); -?> -

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 for you to HESK 2.6.0's IP/email ban feature. Select the user below that will be the "creator" of the bans, -then click "Submit".

-
- - -
- -

Installation / Update complete!

-

Please delete the install folder for security reasons, and then proceed back to the Help Desk

- \ No newline at end of file diff --git a/js/modsForHesk-javascript.js b/js/modsForHesk-javascript.js index 0b0924c0..d48d6b80 100644 --- a/js/modsForHesk-javascript.js +++ b/js/modsForHesk-javascript.js @@ -160,6 +160,11 @@ function processUpdates(startingVersion) { } else if (startingVersion < 200) { startVersionUpgrade('200'); executeUpdate(200, '200'); + } else if (startingVersion < 201) { + startVersionUpgrade('201'); + executeUpdate(201, '201'); + } else { + installationFinished(); } } @@ -209,7 +214,7 @@ function migrateIpEmailBans(version, cssclass) { function installationFinished() { var output = '
' + '
' + - '

' + + '

' + '

Awesome! The installation / upgrade has completed. Please delete the install directory and then proceed to your helpdesk!

' + '
' + '
'; @@ -261,7 +266,7 @@ function runMigration() { function migrateComplete() { $('#attention-row').hide(); markUpdateAsSuccess('banmigrate'); - installationFinished(); + processUpdates(200); } jQuery(document).ready(loadJquery);