Reihenfolge: Laden der localconfig vs. Laden der config.php der einzelnen Module
Hi,
mir ist aufgefallen, dass sich die Reihenfolge des Ladens der localconfig.php und der config.phps der einzelnen Module in Contao 3.0 geändert hat.
Contao 2.11.x
PHP-Code:
include(TL_ROOT . '/system/config/config.php');
if (file_exists(TL_ROOT . '/system/config/localconfig.php'))
{
$this->blnHasLcf = true;
include(TL_ROOT . '/system/config/localconfig.php');
}
// Load the agent file
include(TL_ROOT . '/system/config/agents.php');
// Get the module configuration files
foreach ($this->getActiveModules() as $strModule)
{
$strFile = TL_ROOT . '/system/modules/' . $strModule . '/config/config.php';
if (file_exists($strFile))
{
include($strFile);
}
}
Contao 3.0
PHP-Code:
// Load the default files
include TL_ROOT . '/system/config/default.php';
include TL_ROOT . '/system/config/agents.php';
// Get the module configuration files
foreach ($this->getActiveModules() as $strModule)
{
$strFile = TL_ROOT . '/system/modules/' . $strModule . '/config/config.php';
if (file_exists($strFile))
{
include $strFile;
}
}
// Return if there is no local configuration file yet
if (!file_exists(TL_ROOT . '/system/config/localconfig.php'))
{
return;
}
$this->blnHasLcf = true;
include TL_ROOT . '/system/config/localconfig.php';
Gibt es dafür einen Grund? Problem ist, dass man nun, wenn man in der config.php auf die Werte des TL_CONFIG-Arrays zugreift nur die Standardwerte aus der default.php und der agents.php hat, nicht aber auf die Werte der localconfig.php.
lg
oetzi