[MODULES] Make default loading attributes available in global config

This commit is contained in:
Diogo Cordeiro 2020-08-04 01:36:21 +01:00
parent 1675916fda
commit 34c5be5c42

View File

@ -76,7 +76,12 @@ class GNUsocial
// TODO: put into a static array that makes sure $inst isn't lost.
$inst = new $moduleclass();
foreach ($attrs as $aname => $avalue) {
$inst->$aname = $avalue;
// Only apply default if a user preference wasn't set
if (common_config($moduleclass, $aname) === false) {
$inst->$aname = $avalue;
// Module attributes shall be part of global config
common_config_set($moduleclass, $aname, $avalue);
}
}
// Record activated modules for later display/config dump