Fixed debug build from GUI for environments
This commit is contained in:
parent
9f4e92fe68
commit
a3ef15b488
5 changed files with 69 additions and 48 deletions
|
|
@ -570,7 +570,6 @@ class Build extends Model
|
|||
/**
|
||||
* Set the values of Extra / extra.
|
||||
*
|
||||
* @param $name string
|
||||
* @param $values mixed
|
||||
*/
|
||||
public function setExtraValues($values)
|
||||
|
|
@ -583,6 +582,26 @@ class Build extends Model
|
|||
$this->setExtra(json_encode($extra));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a value from the build's "extra" JSON array.
|
||||
* @param null $key
|
||||
* @return mixed|null|string
|
||||
*/
|
||||
public function getExtra($key = null)
|
||||
{
|
||||
$data = json_decode($this->data['extra'], true);
|
||||
|
||||
if (is_null($key)) {
|
||||
$rtn = $data;
|
||||
} elseif (isset($data[$key])) {
|
||||
$rtn = $data[$key];
|
||||
} else {
|
||||
$rtn = null;
|
||||
}
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Project model for this Build by Id.
|
||||
*
|
||||
|
|
@ -801,26 +820,6 @@ class Build extends Model
|
|||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a value from the build's "extra" JSON array.
|
||||
* @param null $key
|
||||
* @return mixed|null|string
|
||||
*/
|
||||
public function getExtra($key = null)
|
||||
{
|
||||
$data = json_decode($this->data['extra'], true);
|
||||
|
||||
if (is_null($key)) {
|
||||
$rtn = $data;
|
||||
} elseif (isset($data[$key])) {
|
||||
$rtn = $data[$key];
|
||||
} else {
|
||||
$rtn = null;
|
||||
}
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the commit message for this build.
|
||||
* @return string
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class Environment extends Model
|
|||
/**
|
||||
* Get the value of Title / title.
|
||||
*
|
||||
* @return string
|
||||
* @return array
|
||||
*/
|
||||
public function getBranches()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue