diff options
| author | 2025-07-30 08:03:04 +0200 | |
|---|---|---|
| committer | 2025-07-30 08:03:04 +0200 | |
| commit | e33ef74af9ff2f8ba1c6909b78ee07633cff240a (patch) | |
| tree | 8efbe0d1ac1105a996029adc0703f9cf4de118f6 /lib/Minz/ExtensionManager.php | |
| parent | e967b07589f687fcd2f71e2df265fcb7c4f15c07 (diff) | |
`before_login_btn` hook + system conf attributes (#7761)
* `before_login_btn` hook + system conf attributes
* phpstan fix
* Refactoring
---------
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'lib/Minz/ExtensionManager.php')
| -rw-r--r-- | lib/Minz/ExtensionManager.php | 9 |
1 files changed, 8 insertions, 1 deletions
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)) { |
