From 2222d6d173183992d6786a76a3952b4a4b811e5f Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Sat, 25 Jul 2020 17:47:53 +0100 Subject: [PATCH] [MODULES] Make settings great again Plugin main class doesn't use this construct despite extending this class. --- lib/modules/Module.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/modules/Module.php b/lib/modules/Module.php index 70f0e1b8de..498c45df33 100644 --- a/lib/modules/Module.php +++ b/lib/modules/Module.php @@ -41,6 +41,11 @@ class Module { public function __construct() { + // Load Module settings + foreach (common_config(static::class) as $aname => $avalue) { + $this->$aname = $avalue; + } + Event::addHandler('InitializeModule', [$this, 'initialize']); Event::addHandler('CleanupModule', [$this, 'cleanup']);