Update installer the right way

This commit is contained in:
Mike Koch 2017-04-11 12:13:59 -04:00
parent 3556dd9618
commit 95606d1f0a
5 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<?php
// Define the current build
define('MODS_FOR_HESK_BUILD', 38);
define('MODS_FOR_HESK_BUILD', 40);

View File

@ -84,6 +84,8 @@ if ($version == 2) {
execute304Scripts();
} elseif ($version == 39) {
execute305Scripts();
} elseif ($version == 40) {
execute306Scripts();
} else {
$response = 'The version "' . $version . '" was not recognized. Check the value submitted and try again.';
print $response;

View File

@ -48,6 +48,7 @@ $buildToVersionMap = array(
37 => '3.0.3',
38 => '3.0.4',
39 => '3.0.5',
40 => '3.0.6',
);
function echoInitialVersionRows($version, $build_to_version_map)

View File

@ -113,6 +113,9 @@ function processUpdates(startingVersion) {
} else if (startingVersion < 39) {
startVersionUpgrade('305');
executeUpdate(39, '305', '3.0.5');
} else if (startingVersion < 40) {
startVersionUpgrade('306');
executeUpdate(40, '306', '3.0.6');
} else {
installationFinished();
}

View File

@ -972,4 +972,11 @@ function execute305Scripts() {
hesk_dbConnect();
updateVersion('3.0.5');
}
function execute306Scripts() {
global $hesk_settings;
hesk_dbConnect();
updateVersion('3.0.6');
}