mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-28 10:08:56 +02:00
Fixes on Config parser for new Yaml library.
This commit is contained in:
+29
-8
@@ -158,7 +158,11 @@ class Mage_Config
|
||||
{
|
||||
$options = $this->getEnvironment();
|
||||
if (isset($options['deployment'][$option])) {
|
||||
return $options['deployment'][$option];
|
||||
if (is_array($default) && ($options['deployment'][$option] == '')) {
|
||||
return $default;
|
||||
} else {
|
||||
return $options['deployment'][$option];
|
||||
}
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
@@ -167,8 +171,12 @@ class Mage_Config
|
||||
public function release($option, $default = false)
|
||||
{
|
||||
$options = $this->getEnvironment();
|
||||
if (isset($options['releases'][$option])) {
|
||||
return $options['releases'][$option];
|
||||
if (isset($options['releases'][$option])) {
|
||||
if (is_array($default) && ($options['releases'][$option] == '')) {
|
||||
return $default;
|
||||
} else {
|
||||
return $options['releases'][$option];
|
||||
}
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
@@ -177,7 +185,12 @@ class Mage_Config
|
||||
public function scm($option, $default = false)
|
||||
{
|
||||
$options = $this->_scm;
|
||||
if (isset($options[$option])) {
|
||||
if (isset($options[$option])) {
|
||||
if (is_array($default) && ($options[$option] == '')) {
|
||||
return $default;
|
||||
} else {
|
||||
return $options[$option];
|
||||
}
|
||||
return $options[$option];
|
||||
} else {
|
||||
return $default;
|
||||
@@ -187,8 +200,12 @@ class Mage_Config
|
||||
public function general($option, $default = false)
|
||||
{
|
||||
$options = $this->_general;
|
||||
if (isset($options[$option])) {
|
||||
return $options[$option];
|
||||
if (isset($options[$option])) {
|
||||
if (is_array($default) && ($options[$option] == '')) {
|
||||
return $default;
|
||||
} else {
|
||||
return $options[$option];
|
||||
}
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
@@ -197,8 +214,12 @@ class Mage_Config
|
||||
public function mail($option, $default = false)
|
||||
{
|
||||
$options = $this->_general;
|
||||
if (isset($options['mail'][$option])) {
|
||||
return $options['mail'][$option];
|
||||
if (isset($options['mail'][$option])) {
|
||||
if (is_array($default) && ($options['mail'][$option] == '')) {
|
||||
return $default;
|
||||
} else {
|
||||
return $options['mail'][$option];
|
||||
}
|
||||
} else {
|
||||
return $default;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user