Commit 46f5d684 authored by Johan Cwiklinski's avatar Johan Cwiklinski Committed by Johan Cwiklinski

Bump version, add update script

parent c4424a3e
......@@ -31,7 +31,7 @@
*/
// Current version of GLPI
define('GLPI_VERSION', '9.3-dev');
define('GLPI_VERSION', '9.4-dev');
if (substr(GLPI_VERSION, -4) === '-dev') {
//for dev version
define('GLPI_PREVER', str_replace('-dev', '', GLPI_VERSION));
......@@ -41,7 +41,7 @@ if (substr(GLPI_VERSION, -4) === '-dev') {
);
} else {
//for stable version
define("GLPI_SCHEMA_VERSION", '9.2.3');
define("GLPI_SCHEMA_VERSION", '9.4');
}
define('GLPI_MIN_PHP', '5.6.0'); // Must also be changed in top of index.php
define('GLPI_YEAR', '2018');
......
......@@ -420,9 +420,13 @@ class Update extends CommonGLPI {
update922to923();
case "9.2.3":
case GLPI_PREVER:
include_once("{$updir}update_92_93.php");
update92to93();
case "9.3":
case GLPI_PREVER:
include_once("{$updir}update_93_94.php");
update93to94();
break;
case GLPI_VERSION:
......
<?php
/**
* ---------------------------------------------------------------------
* GLPI - Gestionnaire Libre de Parc Informatique
* Copyright (C) 2015-2018 Teclib' and contributors.
*
* http://glpi-project.org
*
* based on GLPI - Gestionnaire Libre de Parc Informatique
* Copyright (C) 2003-2014 by the INDEPNET Development Team.
*
* ---------------------------------------------------------------------
*
* LICENSE
*
* This file is part of GLPI.
*
* GLPI is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* GLPI is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GLPI. If not, see <http://www.gnu.org/licenses/>.
* ---------------------------------------------------------------------
*/
/**
* Update from 9.3 to 9.4
*
* @return bool for success (will die for most error)
**/
function update93to94() {
global $DB, $migration, $CFG_GLPI;
$dbutils = new DbUtils();
$current_config = Config::getConfigurationValues('core');
$updateresult = true;
$ADDTODISPLAYPREF = [];
//TRANS: %s is the number of new version
$migration->displayTitle(sprintf(__('Update to %s'), '9.4'));
$migration->setVersion('9.4');
//put your update rules here, and drop the line!
// ************ Keep it at the end **************
$migration->executeMigration();
return $updateresult;
}
......@@ -153,8 +153,8 @@ if (version_compare($current_db_version, GLPI_SCHEMA_VERSION, 'ne')) {
$migration->displayWarning("\nMigration Done.");
} else if (isset($args['force']) || $current_db_version != GLPI_SCHEMA_VERSION && isset($args['dev'])) {
include_once("../install/update_92_93.php");
update92to93();
include_once("../install/update_93_94.php");
update93to94();
$migration->displayWarning((isset($args['force']) ? "\nForced" : "\nDevelopment") . " migration Done.");
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment