[MODULES] Make settings great again

Plugin main class doesn't use this construct despite extending this class.
This commit is contained in:
Diogo Cordeiro 2020-07-25 17:47:53 +01:00 committed by Diogo Peralta Cordeiro
parent 2d3ec87ea4
commit 360fc0262b

View File

@ -41,6 +41,11 @@ class Module
{ {
public function __construct() public function __construct()
{ {
// Load Module settings
foreach (common_config(static::class) as $aname => $avalue) {
$this->$aname = $avalue;
}
Event::addHandler('InitializeModule', [$this, 'initialize']); Event::addHandler('InitializeModule', [$this, 'initialize']);
Event::addHandler('CleanupModule', [$this, 'cleanup']); Event::addHandler('CleanupModule', [$this, 'cleanup']);