Commit a8c20894 authored by Cédric Anne's avatar Cédric Anne Committed by Johan Cwiklinski
Browse files

Add next major release placeholder

parent e523b658
......@@ -3,6 +3,22 @@
The present file will list all changes made to the project; according to the
[Keep a Changelog](http://keepachangelog.com/) project.
## [x.x.x] unreleased
### Added
### Changed
### API changes
#### Added
#### Changes
#### Deprecated
#### Removed
## [9.5.1] unreleased
## [9.5.0] 2020-07-07
......
......@@ -165,8 +165,8 @@ class UpdateCommand extends AbstractCommand implements ForceNoPluginsOptionComma
} else if ($force) {
// Replay last update script even if there is no schema change.
// It can be used in dev environment when update script has been updated/fixed.
include_once(GLPI_ROOT . '/install/update_94_95.php');
update94to95();
include_once(GLPI_ROOT . '/install/update_95_xx.php');
update95toXX();
$output->writeln('<info>' . __('Last migration replayed.') . '</info>');
}
......
......@@ -473,6 +473,20 @@ class Update extends CommonGLPI {
case "9.5.0-dev":
include_once "{$updir}update_94_95.php";
update94to95();
case "9.5.0":
case "9.5.1":
case "9.5.2":
case "9.5.3":
case "9.5.4":
case "9.5.5":
case "9.5.6":
case "9.5.7":
case "9.5.8":
case "9.5.9":
case "x.x.x-dev":
include_once "{$updir}update_95_xx.php";
update95toXX();
break;
case GLPI_VERSION:
......
<?php
/**
* ---------------------------------------------------------------------
* GLPI - Gestionnaire Libre de Parc Informatique
* Copyright (C) 2015-2020 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.5.x to x.x.x
*
* @return bool for success (will die for most error)
**/
function update95toXX() {
global $DB, $migration;
$updateresult = true;
$ADDTODISPLAYPREF = [];
//TRANS: %s is the number of new version
$migration->displayTitle(sprintf(__('Update to %s'), 'x.x.x'));
$migration->setVersion('x.x.x');
// ************ Keep it at the end **************
foreach ($ADDTODISPLAYPREF as $type => $tab) {
$rank = 1;
foreach ($tab as $newval) {
$DB->updateOrInsert("glpi_displaypreferences", [
'rank' => $rank++
], [
'users_id' => "0",
'itemtype' => $type,
'num' => $newval,
]);
}
}
$migration->executeMigration();
return $updateresult;
}
Supports Markdown
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