diff --git a/CHANGELOG.md b/CHANGELOG.md index b5f37a1..14edb03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ --- develop --- +* bug: Pass a boolean (not the integer 1) to api_plugin_register_hook()'s $enable argument so the hook registration stays type-correct under Cacti 1.3's strict bool type-hint (the int only coerces while the file lacks declare(strict_types=1)) * security: Move the graph 'Add to QuickTree' icon's inline `onClick='addQuickTree()'` handler into a delegated jQuery binding in `js/quicktree.js` (via a `quicktreeAddLink` class and `data-` attributes) and replace the confirmation pages' inline `onClick='cactiReturnTo()'` Cancel buttons with the CSP-safe `cactiReturnTo` class, so the pages no longer trip Cacti's Content-Security-Policy script-src-attr directive * dev: Replace the translation-template CI check that regenerated locales/po/cacti.pot and compared it with a diff-based gate (tests/bin/check-i18n-pot.php) requiring cacti.pot to be updated only when a pull request adds, removes, or modifies an i18n function call * dev: Measure CI coverage with xdebug instead of pcov so the plugin's own sources are instrumented (pcov auto-scopes to the Composer root and skipped cacti/plugins/, leaving the patch-coverage gate with nothing to measure) diff --git a/setup.php b/setup.php index d43b47f..abd4931 100644 --- a/setup.php +++ b/setup.php @@ -423,7 +423,7 @@ function quicktree_check_upgrade(): void { ['quicktree']); if ($current != $old) { - api_plugin_register_hook('quicktree', 'page_head', 'quicktree_page_head', 'setup.php', 1); + api_plugin_register_hook('quicktree', 'page_head', 'quicktree_page_head', 'setup.php', true); quicktree_setup_table(); diff --git a/tests/Unit/QuicktreeCheckUpgradeTest.php b/tests/Unit/QuicktreeCheckUpgradeTest.php index e39321c..3e69d4f 100644 --- a/tests/Unit/QuicktreeCheckUpgradeTest.php +++ b/tests/Unit/QuicktreeCheckUpgradeTest.php @@ -1,4 +1,4 @@ -not->toBeEmpty();