From e33ef74af9ff2f8ba1c6909b78ee07633cff240a Mon Sep 17 00:00:00 2001 From: Inverle Date: Wed, 30 Jul 2025 08:03:04 +0200 Subject: `before_login_btn` hook + system conf attributes (#7761) * `before_login_btn` hook + system conf attributes * phpstan fix * Refactoring --------- Co-authored-by: Alexandre Alapetite --- lib/Minz/ExtensionManager.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/Minz/ExtensionManager.php') diff --git a/lib/Minz/ExtensionManager.php b/lib/Minz/ExtensionManager.php index fc6a7f08a..936af82a1 100644 --- a/lib/Minz/ExtensionManager.php +++ b/lib/Minz/ExtensionManager.php @@ -26,6 +26,10 @@ final class Minz_ExtensionManager { 'list' => [], 'signature' => 'NoneToNone', ], + 'before_login_btn' => [ // function(): string + 'list' => [], + 'signature' => 'NoneToString', + ], 'check_url_before_add' => [ // function($url) -> Url | null 'list' => [], 'signature' => 'OneToOne', @@ -155,7 +159,10 @@ final class Minz_ExtensionManager { $list_potential_extensions = array_merge($list_core_extensions, $list_thirdparty_extensions); $system_conf = Minz_Configuration::get('system'); - self::$ext_auto_enabled = $system_conf->extensions_enabled; + self::$ext_auto_enabled = array_filter( + $system_conf->attributeArray('extensions_enabled') ?? [], + fn($value, $key): bool => is_string($key) && is_bool($value), + ARRAY_FILTER_USE_BOTH); foreach ($list_potential_extensions as $ext_pathname) { if (!is_dir($ext_pathname)) { -- cgit v1.2.3