Browse Source

Update installer

merge-requests/2/head 2.5.1
Mike Koch 6 years ago
parent
commit
471f7fbd17
  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. 48
      install/mods-for-hesk/modsForHesk.php
  8. 11
      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', 21);
define('MODS_FOR_HESK_BUILD', 22);
/* 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', 21);
define('MODS_FOR_HESK_BUILD', 22);
/* 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.0');
define('MODS_FOR_HESK_NEW_VERSION','2.5.1');
define('REQUIRE_PHP_VERSION','5.0.0');
define('REQUIRE_MYSQL_VERSION','5.0.7');

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

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

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

@ -71,6 +71,9 @@ function echoInitialVersionRows($version)
if ($version < 21) {
printRow('2.5.0');
}
if ($version < 22) {
printRow('2.5.1');
}
}
function printRow($version)

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

@ -59,6 +59,9 @@ function processUpdates(startingVersion) {
} else if (startingVersion < 21) {
startVersionUpgrade('250');
executeUpdate(21, '250', '2.5.0');
} else if (startingVersion < 22) {
startVersionUpgrade('251');
executeUpdate(22, '251', '2.5.1');
} else {
installationFinished();
}

48
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.0') {
$v250btn = 'btn-success';
$disableAllExcept = '250';
} else {
$v250btn = 'btn-default';
}
?>
<a id="250" class="btn <?php echo $v250btn; ?> btn-block disablable"
href="installModsForHesk.php?v=21">2.5.0</a>
</div>
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.4.2') {
@ -166,6 +178,10 @@ 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') {
@ -178,10 +194,6 @@ hesk_dbConnect();
<a id="232" class="btn <?php echo $v232btn; ?> btn-block disablable"
href="installModsForHesk.php?v=17">2.3.2</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.3.1') {
@ -218,6 +230,10 @@ 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') {
@ -230,10 +246,6 @@ hesk_dbConnect();
<a id="220" class="btn <?php echo $v220btn; ?> btn-block disablable"
href="installModsForHesk.php?v=13">2.2.0</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '2.1.1') {
@ -270,6 +282,10 @@ 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') {
@ -282,10 +298,6 @@ hesk_dbConnect();
<a id="200" class="btn <?php echo $v200btn; ?> btn-block disablable"
href="installModsForHesk.php?v=9">2.0.0</a>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3 col-sm-12">
<?php
if ($version == '1.7.0') {
@ -323,14 +335,14 @@ hesk_dbConnect();
<a id="160" class="btn <?php echo $v160btn; ?> btn-block disablable"
href="installModsForHesk.php?v=6">1.6.0</a>
</div>
<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>
</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>
</div>
<div class="col-md-3 col-sm-12">
<a id="141" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=4">1.4.1</a>
@ -343,6 +355,10 @@ hesk_dbConnect();
<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="124" class="btn btn-default btn-block disablable"
href="installModsForHesk.php?v=1">1.2.4</a>

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

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