}
/*---------------------------------------------------------------------*/
if (!TableExists("glpi_configs")) {
die("GLPI not installed\n");
}
$plugin = new Plugin();
include GLPI_ROOT . "/plugins/timelineticket/install/update.php";
include GLPI_ROOT . "/plugins/timelineticket/locales/en_GB.php";
include GLPI_ROOT . "/plugins/timelineticket/hook.php";
$current_version = pluginTimelineticketGetCurrentVersion(PLUGIN_TIMELINETICKET_VERSION);
$migration = new CliMigration($current_version);
if (!isset($current_version)) {
$current_version = 0;
}
if ($current_version == '0') {
$migration->displayWarning("***** Install process of plugin TIMELINETICKET *****");
} else {
$migration->displayWarning("***** Update process of plugin TIMELINETICKET *****");
}
$migration->displayWarning("Current Timelineticket version: {$current_version}");
$migration->displayWarning("Version to update: " . PLUGIN_TIMELINETICKET_VERSION);
// To prevent problem of execution time
ini_set("max_execution_time", "0");
ini_set("memory_limit", "-1");
$mess = '';
if ($current_version != PLUGIN_TIMELINETICKET_VERSION and $current_version != '0') {
$mess = "Update done.";
} else {
if ($current_version == PLUGIN_TIMELINETICKET_VERSION) {
$mess = "No migration needed.";
} else {