From 906f308f50ea5f27b58148d5186c31a9cf3de16f Mon Sep 17 00:00:00 2001 From: mariano Date: Wed, 3 Jun 2026 14:03:43 +0200 Subject: [PATCH] 0.2.1 --- MEMORY.md | 1 + src/AssetTab.php | 18 ------------------ 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/MEMORY.md b/MEMORY.md index f659ad3..c073388 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -74,3 +74,4 @@ In una nuova installazione del plugin, i campi "API username" e "API password" n 7. **README.md** creato 8. **PURGE right**: Aggiunto PURGE ai diritti di installazione (`Profile.php:76,90`); applicato a tutti i profili Super-Admin esistenti nel DB 9. **CSRF GLPI 11 fix**: `Session::checkCSRF()` richiede `$_POST` come argomento in GLPI 11; aggiunto `X-Glpi-Csrf-Token` header al JS AJAX +10. **Session::isDebugActive()**: Metodo inesistente in GLPI 11; sostituito in `AssetTab.php:150` con `($_SESSION['glpi_use_mode'] ?? Session::NORMAL_MODE) === Session::DEBUG_MODE` diff --git a/src/AssetTab.php b/src/AssetTab.php index 5446b11..c6bf0b7 100644 --- a/src/AssetTab.php +++ b/src/AssetTab.php @@ -147,24 +147,6 @@ class AssetTab extends CommonDBTM echo ""; echo "
"; echo htmlspecialchars(__('No UrBackup server available for the root location of this asset.', 'urbackup')); - if (Session::isDebugActive()) { - $loc_id = LocationHelper::getAssetLocationId($item); - $root_id = LocationHelper::getRootLocationIdForAsset($item); - echo "
"; - echo "Asset locations_id: " . htmlspecialchars((string) $loc_id); - echo " | Root location ID: " . htmlspecialchars((string) $root_id); - echo " | glpi_plugin_urbackup_servers with this root ID + is_active=1: "; - global $DB; - $count = $DB->request([ - 'FROM' => Server::getTable(), - 'WHERE' => [ - 'locations_id' => $root_id, - 'is_active' => 1, - ], - ]); - echo htmlspecialchars((string) count($count)); - echo ""; - } echo "
"; echo ""; echo "";