The module config (config.module.php) of a module is now available through $this->cfg
This commit is contained in:
parent
02b3438623
commit
d27af90a8f
|
@ -102,6 +102,14 @@ class Modules extends Bus{
|
|||
$CLASS->setModuleName($name);
|
||||
}
|
||||
if (method_exists($CLASS, 'setModuleConfig')) {
|
||||
// Append the config file to the module CFG (accessable through $this->cfg)
|
||||
if (file_exists($cfg->directory . "/" . "config.".strtolower($cfg->module_name).".php")) {
|
||||
$data = (object) include($cfg->directory . "/" . "config.".strtolower($cfg->module_name).".php");
|
||||
foreach ($data as $key => $value) {
|
||||
$cfg->$key = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$CLASS->setModuleConfig($cfg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue