Add 2.1.0 update scripts
This commit is contained in:
parent
75168b5026
commit
a120e8d5c5
@ -27,6 +27,9 @@ if ($version == 1) {
|
||||
execute200FileUpdate();
|
||||
} elseif ($version == 201) {
|
||||
execute201Scripts();
|
||||
} elseif ($version == 210) {
|
||||
execute210Scripts();
|
||||
execute210FileUpdate();
|
||||
} else {
|
||||
$response = 'The version "'.$version.'" was not recognized. Check the value submitted and try again.';
|
||||
print $response;
|
||||
|
@ -37,6 +37,9 @@ function echoInitialVersionRows($version) {
|
||||
if ($version < 201) {
|
||||
printRow('v2.0.1');
|
||||
}
|
||||
if ($version < 210) {
|
||||
printRow('v2.1.0');
|
||||
}
|
||||
}
|
||||
|
||||
function printRow($version) {
|
||||
|
@ -26,6 +26,9 @@ function processUpdates(startingVersion) {
|
||||
} else if (startingVersion < 201) {
|
||||
startVersionUpgrade('201');
|
||||
executeUpdate(201, '201', '2.0.1');
|
||||
} else if (startingVersion < 210) {
|
||||
startVersionUpgrade('210');
|
||||
executeUpdate(210, '210', '2.1.0');
|
||||
} else {
|
||||
installationFinished();
|
||||
}
|
||||
|
@ -321,11 +321,35 @@ function migrateBans($creator) {
|
||||
}
|
||||
// END Version 2.0.0
|
||||
|
||||
// BEGIN Version 2.0.1
|
||||
// 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
|
||||
|
||||
// BEGIN Version 2.1.0
|
||||
function execute210Scripts() {
|
||||
global $hesk_settings;
|
||||
|
||||
hesk_dbConnect();
|
||||
executeQuery("UPDATE `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` SET `Value` = '2.1.0' WHERE `Key` = 'modsForHeskVersion'");
|
||||
}
|
||||
|
||||
function execute210FileUpdate() {
|
||||
//-- Add the boostrap theme property to modsForHesk_settings.inc.php
|
||||
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
|
||||
//-- Only add the additional settings if they aren't already there.
|
||||
if (strpos($file, 'use_bootstrap_theme') === false)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
//-- Set this to 1 to enable bootstrap-theme.css
|
||||
$modsForHesk_settings[\'use_bootstrap_theme\'] = 1;';
|
||||
}
|
||||
|
||||
return file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file);
|
||||
}
|
||||
// END Version 2.1.0
|
Loading…
x
Reference in New Issue
Block a user