Tweaks on configs.

Added Init command.
This commit is contained in:
Andrs Montaez
2011-11-23 23:45:04 -02:00
parent 6d5e7ef22f
commit d138de317a
5 changed files with 51 additions and 15 deletions
+5 -3
View File
@@ -6,14 +6,16 @@ class Mage_Config
public function loadEnvironment($environment)
{
if ($environment != '') {
$this->_environment = yaml_parse_file('.mage/config/environment/' . $environment . '.yaml');
if (($environment != '') && file_exists('.mage/config/environment/' . $environment . '.yaml')) {
$this->_environment = @yaml_parse_file('.mage/config/environment/' . $environment . '.yaml');
}
}
public function loadSCM()
{
$this->_scm = yaml_parse_file('.mage/config/scm.yaml');
if (file_exists('.mage/config/scm.yaml')) {
$this->_scm = @yaml_parse_file('.mage/config/scm.yaml');
}
}
public function getEnvironment()