Files
tomolino-processmaker/install/update.php
tomolimo ca197c9f43 Cherry pick from 3.5.10 to 3.6.16
Added feature GLPI_TASK_PREVENT_REASSIGN to prevent assignment of a list of users (can be PM UID, GLPI id, GLPI logon) to a specific task (can be task list)

Cherry pick from 3.4.24 to 3.6.15

Cherry pick from 3.4.23
Added a proxy and SSL mangement to external application calls Added an escape DB for ticket name and ticket solution description Updated translation
Added swingcall.php file (to test swing api)
Set version to 3.6.14

Cherry pick from version 3.4.22
Added a new case variable to be able to create information tasks GLPI_ITEM_INFORMATION_TASK

Cherry pick from 3.4.21
Revert back $_REQUEST into $_POST

cherry pick from version 3.4.20
Added Send reminder Added unclaim task
Rewrite some code for clearer maintenance

commented line HTTPROXY setup

Bugfixe : remove the default setting of a followup

bugfixes:
- list the processes according to the type of ticket (request or incident).
- set variable 'content' according to the variable sent by processmaker in the addItemFollowup function
- logged error information of curl

Set content to tinymce content field

Bugfixes : Update the taskId (value and letter case)

Bugfixes requests. bad syntax with the new ORM

Changed folder properties

Changed text Deleted unused param

Added a hook to manage the change of user login
Cleaning of unused code Set version to 3.6.8

add condition to set user = admin when script is run in crontask fixes
2020-10-07 15:40:05 +02:00

61 lines
2.3 KiB
PHP

<?php
function processmaker_update() {
global $DB;
// update from older versions
// load config to get current version
if (!$DB->fieldExists("glpi_plugin_processmaker_configs", "db_version" )) {
$current_version = '2.4.1';
} else {
include_once(GLPI_ROOT."/plugins/processmaker/inc/config.class.php");
$config = PluginProcessmakerConfig::getInstance();
$current_version = $config->fields['db_version'];
if (empty($current_version)) {
$current_version = '2.4.1';
}
}
switch ($current_version) {
case '2.4.1' :
// will upgrade any old versions (< 3.2.8) to 3.2.8
include_once(GLPI_ROOT."/plugins/processmaker/install/update_to_3_2_8.php");
$new_version = update_to_3_2_8();
case '3.2.8' :
// will upgrade 3.2.8 to 3.2.9
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_2_8_to_3_2_9.php");
$new_version = update_3_2_8_to_3_2_9();
case '3.2.9' :
// will upgrade 3.2.9 to 3.3.0
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_2_9_to_3_3_0.php");
$new_version = update_3_2_9_to_3_3_0();
case '3.3.0' :
// will upgrade 3.3.0 to 3.3.1
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_0_to_3_3_1.php");
$new_version = update_3_3_0_to_3_3_1();
case '3.3.1' :
// will upgrade 3.3.1 to 3.3.8
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_1_to_3_3_8.php");
$new_version = update_3_3_1_to_3_3_8();
case '3.3.8' :
// will upgrade 3.3.8 to 3.4.9
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_8_to_3_4_9.php");
$new_version = update_3_3_8_to_3_4_9();
case '3.4.9' :
// will upgrade 3.4.9 to 3.4.10
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_4_9_to_3_4_10.php");
$new_version = update_3_4_9_to_3_4_10();
}
if (isset($new_version)) {
// end update by updating the db version number
$query = "UPDATE `glpi_plugin_processmaker_configs` SET `db_version` = '$new_version' WHERE `id` = 1;";
$DB->query($query) or die("error when updating db_version field in glpi_plugin_processmaker_configs" . $DB->error());
}
}