From decaafe5bd85ef01438ccbb3064aba9061475ade Mon Sep 17 00:00:00 2001 From: btry Date: Wed, 20 Dec 2017 21:53:06 +0100 Subject: [PATCH] fix(install): detect version 2.6 without schema version, see #794 --- install/install.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install/install.php b/install/install.php index 51e7b6f7d..c0d67e26f 100644 --- a/install/install.php +++ b/install/install.php @@ -92,9 +92,15 @@ protected function getSchemaVersion() { * @return string */ protected function getSchemaVersionFromGlpiConfig() { + global $DB; + $config = Config::getConfigurationValues('formcreator', array('schema_version')); if (!isset($config['schema_version'])) { // No schema version in GLPI config, then this is older than 2.5 + if ($DB->tableExists('glpi_plugin_formcreator_items_targettickets')) { + // Workaround bug #794 where schema version was not saved + return '2.6'; + } return '0.0'; }