From 45734d882c91354ebc50c4ad65d1ea9f127f8c6b Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Sat, 21 Aug 2021 22:30:24 +0100 Subject: [PATCH] [CONFIG] Make it possible to write module configuration in a config.{php,yml,yaml,xml} file and set each value as properties in the module object --- src/Core/GNUsocial.php | 2 +- src/Core/Modules/Module.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Core/GNUsocial.php b/src/Core/GNUsocial.php index 501ef10bb1..c7e54b9e95 100644 --- a/src/Core/GNUsocial.php +++ b/src/Core/GNUsocial.php @@ -179,7 +179,7 @@ class GNUsocial implements EventSubscriberInterface DB::initTableMap(); - // Events are proloaded on compilation, but set at runtime + // Events are preloaded on compilation, but set at runtime, along with configuration $this->module_manager->loadModules(); $this->initialized = true; diff --git a/src/Core/Modules/Module.php b/src/Core/Modules/Module.php index b08a67bb9c..a420fa4f9d 100644 --- a/src/Core/Modules/Module.php +++ b/src/Core/Modules/Module.php @@ -42,9 +42,9 @@ abstract class Module } } - public function name(): string + public static function name() { - return Formatting::camelCaseToSnakeCase(explode('\\', static::class)[2]); + return mb_strtolower(explode('\\', static::class)[2]); } /**