From 827a53d29d058de29056701dcfc08daf984860a0 Mon Sep 17 00:00:00 2001 From: MyuTsu Date: Tue, 16 Jun 2026 14:20:49 +0200 Subject: [PATCH 1/2] fix(uninstall): remove tag rights during uninstall --- CHANGELOG.md | 1 + inc/tag.class.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 733ea0b..41cc544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Prevent SQL error when column `name` not exist from `Item_Device` - Prevent the tag field from appearing in the satisfaction survey. - Fix display translations +- Removed tag rights during plugin uninstall ## [2.14.3] - 2025-12-22 diff --git a/inc/tag.class.php b/inc/tag.class.php index 87f429e..d91acd0 100644 --- a/inc/tag.class.php +++ b/inc/tag.class.php @@ -238,6 +238,12 @@ public static function uninstall() ], ]); + $DB->delete(ProfileRight::getTable(), [ + 'OR' => [ + 'name' => self::$rightname, + ], + ]); + $migration = new Migration(PLUGIN_TAG_VERSION); $migration->dropTable(getTableForItemType(self::class)); From 376b095b5063f9abd2a3b2e650552f0b23e09c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Langlois=20Ga=C3=ABtan?= <64356364+MyvTsv@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:03:38 +0200 Subject: [PATCH 2/2] Update inc/tag.class.php Co-authored-by: Stanislas --- inc/tag.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/inc/tag.class.php b/inc/tag.class.php index d91acd0..664b86d 100644 --- a/inc/tag.class.php +++ b/inc/tag.class.php @@ -238,11 +238,8 @@ public static function uninstall() ], ]); - $DB->delete(ProfileRight::getTable(), [ - 'OR' => [ - 'name' => self::$rightname, - ], - ]); + $profileRight = new ProfileRight(); + $profileRight->deleteByCriteria(['name' => self::$rightname]); $migration = new Migration(PLUGIN_TAG_VERSION); $migration->dropTable(getTableForItemType(self::class));