diff --git a/inc/profile.class.php b/inc/profile.class.php index f8dd7e82..8f7a8e4f 100644 --- a/inc/profile.class.php +++ b/inc/profile.class.php @@ -121,6 +121,8 @@ public static function uninstall() { /** @var DBmysql $DB */ global $DB; - $DB->dropTable('glpi_profilerights'); + $query = "DELETE FROM `glpi_profilerights` + WHERE `name` LIKE '%plugin_genericobject%'"; + $DB->doQuery($query); } } diff --git a/inc/type.class.php b/inc/type.class.php index 376616a1..edcba754 100644 --- a/inc/type.class.php +++ b/inc/type.class.php @@ -654,6 +654,8 @@ public static function uninstall() /** @var DBmysql $DB */ global $DB; + $migration = new Migration(PLUGIN_GENERICOBJECT_VERSION); + //Delete references to PluginGenericobjectType in the following tables self::deleteItemtypeReferencesInGLPI(self::class); @@ -665,7 +667,7 @@ public static function uninstall() } //Delete table - $DB->dropTable('glpi_plugin_genericobject_types', true); + $migration->dropTable('glpi_plugin_genericobject_types'); } diff --git a/inc/typefamily.class.php b/inc/typefamily.class.php index 364c6561..f7ebce06 100644 --- a/inc/typefamily.class.php +++ b/inc/typefamily.class.php @@ -71,7 +71,8 @@ public static function uninstall() /** @var DBmysql $DB */ global $DB; + $migration = new Migration(PLUGIN_GENERICOBJECT_VERSION); $table = getTableForItemType(self::class); - $DB->dropTable($table, true); + $migration->dropTable($table); } } diff --git a/setup.php b/setup.php index 411fa3cb..4f76d272 100644 --- a/setup.php +++ b/setup.php @@ -129,7 +129,7 @@ function plugin_init_genericobject() function plugin_version_genericobject() { return [ - 'name' => __s("Objects management (Migration Only)", "genericobject"), + 'name' => __s("Generic Objects End-of-Life Updater", "genericobject"), 'version' => PLUGIN_GENERICOBJECT_VERSION, 'author' => "Teclib' & siprossii", 'homepage' => 'https://github.com/pluginsGLPI/genericobject',