Skip to content

Commit 443b431

Browse files
authored
Fix(Core): Fix plugin name label (#451)
* Fix(Core): Fix plugin name label * fix uninstall * secure drop table
1 parent b82ccfe commit 443b431

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

inc/profile.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ public static function uninstall()
121121
{
122122
/** @var DBmysql $DB */
123123
global $DB;
124-
$DB->dropTable('glpi_profilerights');
124+
$query = "DELETE FROM `glpi_profilerights`
125+
WHERE `name` LIKE '%plugin_genericobject%'";
126+
$DB->doQuery($query);
125127
}
126128
}

inc/type.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,8 @@ public static function uninstall()
654654
/** @var DBmysql $DB */
655655
global $DB;
656656

657+
$migration = new Migration(PLUGIN_GENERICOBJECT_VERSION);
658+
657659
//Delete references to PluginGenericobjectType in the following tables
658660
self::deleteItemtypeReferencesInGLPI(self::class);
659661

@@ -665,7 +667,7 @@ public static function uninstall()
665667
}
666668

667669
//Delete table
668-
$DB->dropTable('glpi_plugin_genericobject_types', true);
670+
$migration->dropTable('glpi_plugin_genericobject_types');
669671
}
670672

671673

inc/typefamily.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public static function uninstall()
7171
/** @var DBmysql $DB */
7272
global $DB;
7373

74+
$migration = new Migration(PLUGIN_GENERICOBJECT_VERSION);
7475
$table = getTableForItemType(self::class);
75-
$DB->dropTable($table, true);
76+
$migration->dropTable($table);
7677
}
7778
}

setup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function plugin_init_genericobject()
129129
function plugin_version_genericobject()
130130
{
131131
return [
132-
'name' => __s("Objects management (Migration Only)", "genericobject"),
132+
'name' => __s("Generic Objects End-of-Life Updater", "genericobject"),
133133
'version' => PLUGIN_GENERICOBJECT_VERSION,
134134
'author' => "<a href=\"mailto:[email protected]\">Teclib'</a> & siprossii",
135135
'homepage' => 'https://github.com/pluginsGLPI/genericobject',

0 commit comments

Comments
 (0)