diff --git a/hook.php b/hook.php index 1a88f0b9..8fc1bb50 100644 --- a/hook.php +++ b/hook.php @@ -57,7 +57,6 @@ function plugin_fields_install() { 'PluginFieldsContainer_Field', 'PluginFieldsValue', 'PluginFieldsProfile', - 'PluginFieldsMigration', 'PluginFieldsStatusOverride', 'PluginFieldsContainerDisplayCondition', ]; @@ -134,7 +133,6 @@ function plugin_fields_uninstall() { 'PluginFieldsField', 'PluginFieldsValue', 'PluginFieldsProfile', - 'PluginFieldsMigration', 'PluginFieldsContainerDisplayCondition' ]; diff --git a/inc/migration.class.php b/inc/migration.class.php index 376d21a0..7cdd145b 100644 --- a/inc/migration.class.php +++ b/inc/migration.class.php @@ -30,53 +30,10 @@ class PluginFieldsMigration extends Migration { - function __construct($ver = "") { - parent::__construct($ver); - } - - static function install(Migration $migration, $version) { - global $DB; - - $fields_migration = new self; - - if ($DB->tableExists("glpi_plugin_customfields_fields")) { - if (!$fields_migration->updateFromCustomfields()) { - return false; - } - } - - return true; - } - - static function uninstall() { - return true; - } - - function updateFromCustomfields($glpi_version = "0.80") { - //TODO : REWRITE customfield update - return true; - } - function displayMessage($msg) { Session::addMessageAfterRedirect($msg); } - function migrateCustomfieldTypes($old_type) { - $types = [ - 'sectionhead' => 'header', - 'general' => 'text', - 'money' => 'text', - 'note' => 'textarea', - 'text' => 'textarea', - 'number' => 'number', - 'dropdown' => 'dropdown', - 'yesno' => 'yesno', - 'date' => 'date' - ]; - - return $types[$old_type]; - } - /** * Return SQL fields corresponding to given additionnal field. *