Skip to content

Commit

Permalink
fix(install): detect version 2.6 without schema version, see #794
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Dec 21, 2017
1 parent 5e33407 commit decaafe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand Down

0 comments on commit decaafe

Please sign in to comment.