Browse Source

Update installer

merge-requests/2/head
Mike Koch 6 years ago
parent
commit
68cb0114dc
  1. 2
      inc/header.inc.php
  2. 2
      inc/headerAdmin.inc.php
  3. 2
      install/install_functions.inc.php
  4. 2
      install/mods-for-hesk/ajax/install-database-ajax.php
  5. 3
      install/mods-for-hesk/installModsForHesk.php
  6. 3
      install/mods-for-hesk/js/version-scripts.js
  7. 52
      install/mods-for-hesk/modsForHesk.php
  8. 9
      install/mods-for-hesk/sql/installSql.php

2
inc/header.inc.php

@ -29,7 +29,7 @@
*******************************************************************************/
// Define the current build
define('MODS_FOR_HESK_BUILD', 22);
define('MODS_FOR_HESK_BUILD', 23);
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {

2
inc/headerAdmin.inc.php

@ -29,7 +29,7 @@
*******************************************************************************/
// Define the current build
define('MODS_FOR_HESK_BUILD', 22);
define('MODS_FOR_HESK_BUILD', 23);
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {

2
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.5');
define('MODS_FOR_HESK_NEW_VERSION','2.5.1');
define('MODS_FOR_HESK_NEW_VERSION','2.5.2');
define('REQUIRE_PHP_VERSION','5.0.0');
define('REQUIRE_MYSQL_VERSION','5.0.7');

2
install/mods-for-hesk/ajax/install-database-ajax.php

@ -50,6 +50,8 @@ if ($version == 2) {
execute250Scripts();
} elseif ($version == 22) {
execute251Scripts();
} elseif ($version == 23) {
execute252Scripts();
} else {
$response = 'The version "' . $version . '" was not recognized. Check the value submitted and try again.';
print $response;

3
install/mods-for-hesk/installModsForHesk.php

@ -74,6 +74,9 @@ function echoInitialVersionRows($version)
if ($version < 22) {
printRow('2.5.1');
}
if ($version < 23) {
printRow('2.5.2');
}
}
function printRow($version)

3
install/mods-for-hesk/js/version-scripts.js

@ -62,6 +62,9 @@ function processUpdates(startingVersion) {
} else if (startingVersion < 22) {
startVersionUpgrade('251');
executeUpdate(22, '251', '2.5.1');
} else if (startingVersion < 23) {
startVersionUpgrade('252');
executeUpdate(23, '252', '2.5.2');
} else {
installationFinished();
}

52
install/mods-for-hesk/modsForHesk.php

@ -130,6 +130,18 @@ hesk_dbConnect();
}
?>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.5.1') {
$v251btn = 'btn-success';
$disableAllExcept = '251';
} else {
$v251btn = 'btn-default';
}
?>
<a id="251" class="btn <?php echo $v251btn; ?> btn-block disablable"
href="installModsForHesk.php?v=22">2.5.1</a>
</div>
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.5.0') {
@ -166,6 +178,10 @@ hesk_dbConnect();
<a id="241" class="btn <?php echo $v241btn; ?> btn-block disablable"
href="installModsForHesk.php?v=19">2.4.1</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.4.0') {
@ -178,10 +194,6 @@ hesk_dbConnect();
<a id="240" class="btn <?php echo $v240btn; ?> btn-block disablable"
href="installModsForHesk.php?v=18">2.4.0</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.3.2') {
@ -218,6 +230,10 @@ hesk_dbConnect();
<a id="230" class="btn <?php echo $v230btn; ?> btn-block disablable"
href="installModsForHesk.php?v=15">2.3.0</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.2.1') {
@ -230,10 +246,6 @@ hesk_dbConnect();
<a id="221" class="btn <?php echo $v221btn; ?> btn-block disablable"
href="installModsForHesk.php?v=14">2.2.1</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.2.0') {
@ -270,6 +282,10 @@ hesk_dbConnect();
<a id="210" class="btn <?php echo $v210btn; ?> btn-block disablable"
href="installModsForHesk.php?v=11">2.1.0</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.0.1') {
@ -282,10 +298,6 @@ hesk_dbConnect();
<a id="201" class="btn <?php echo $v201btn; ?> btn-block disablable"
href="installModsForHesk.php?v=10">2.0.1</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.0.0') {
@ -322,6 +334,10 @@ hesk_dbConnect();
<a id="161" class="btn <?php echo $v161btn; ?> btn-block disablable"
href="installModsForHesk.php?v=7">1.6.1</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
@ -335,10 +351,6 @@ hesk_dbConnect();
<a id="160" class="btn <?php echo $v160btn; ?> btn-block disablable"
href="installModsForHesk.php?v=6">1.6.0</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<a id="150" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=5">1.5.0</a>
@ -351,14 +363,14 @@ hesk_dbConnect();
<a id="140" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=3">1.4.0</a>
</div>
<div class="col-md-3 col-sm-12">
<a id="130" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=2">1.3.0</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<a id="130" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=2">1.3.0</a>
</div>
<div class="col-md-3 col-sm-12">
<a id="124" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=1">1.2.4</a>

9
install/mods-for-hesk/sql/installSql.php

@ -684,4 +684,13 @@ function execute251Scripts()
hesk_dbConnect();
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.1' WHERE `Key` = 'modsForHeskVersion'");
}
// Version 2.5.2
function execute252Scripts()
{
global $hesk_settings;
hesk_dbConnect();
executeQuery("UPDATE `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` SET `Value` = '2.5.2' WHERE `Key` = 'modsForHeskVersion'");
}
Loading…
Cancel
Save