Skip to content

Commit

Permalink
Fixed issue #6638: Unable to change config-default in config.php
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Oct 4, 2012
1 parent 5fff471 commit 2102cb2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions application/core/LSYii_Application.php
Expand Up @@ -34,11 +34,17 @@ public function __construct($config = null)
}
parent::__construct($config);
// Load the default and environmental settings from different files into self.
$ls_config = require(APPPATH . '/config/config-defaults.php');
$email_config = require(APPPATH . '/config/email.php');
$version_config = require(APPPATH . '/config/version.php');

$ls_config = require(APPPATH . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config-defaults.php');
$email_config = require(APPPATH . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'email.php');
$version_config = require(APPPATH . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'version.php');
$settings = array_merge($ls_config, $version_config, $email_config);

if(file_exists(APPPATH . DIRECTORY_SEPARATOR. 'config' . DIRECTORY_SEPARATOR . 'config.php'))
{
$ls_config = require(APPPATH . DIRECTORY_SEPARATOR. 'config' . DIRECTORY_SEPARATOR . 'config.php');
$settings = array_merge($settings, $ls_config);
}

foreach ($settings as $key => $value)
$this->setConfig($key, $value);
}
Expand Down

0 comments on commit 2102cb2

Please sign in to comment.