From da2730f1dd5872d7ed8f8c3362a01565fefff405 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Fri, 3 Jul 2026 13:47:09 +0200 Subject: [PATCH 1/2] docs(hook): document a hook function --- hook.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hook.php b/hook.php index 66dd3725..54d99277 100644 --- a/hook.php +++ b/hook.php @@ -295,7 +295,13 @@ function plugin_carbon_hook_pre_purge_assettype(CommonDBTM $item) ]); } -function plugin_carbon_MassiveActions($itemtype) +/** + * Massive actions enumeration hook + * + * @param class-string $itemtype + * @return array + */ +function plugin_carbon_MassiveActions($itemtype): array { switch ($itemtype) { case GlpiComputer::class: From 11aa481d649669f5d8562dc49fbe0ef94100e82a Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Fri, 3 Jul 2026 13:46:39 +0200 Subject: [PATCH 2/2] fix(SearchOprions): better group title replace Plugins with the friendly name of the plugin, potentially distinguish the search criteria from other plugins --- src/SearchOptions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SearchOptions.php b/src/SearchOptions.php index 06df8939..77a66819 100644 --- a/src/SearchOptions.php +++ b/src/SearchOptions.php @@ -130,6 +130,11 @@ public static function getCoreSearchOptions(string $itemtype): array { $sopt = []; + $sopt[] = [ + 'id' => 'carbon', + 'name' => __('Environmental impact', 'carbon'), + ]; + if ($itemtype === GlpiLocation::class) { $sopt[] = [ 'id' => SearchOptions::LOCATION_BOAVIZTA_ZONE,