Commit 02f35cf1 authored by Adrian Rossouw's avatar Adrian Rossouw

Add IP address property including the ability to pass 'null' as the value of a...

Add IP address property including the ability to pass 'null' as the value of a property to reset it to the default. #836166
parent dfa6cf13
......@@ -197,7 +197,10 @@ class provisionEnvironment {
*/
function setProperty($field, $default = NULL, $array = FALSE) {
if (isset($this->options[$field])) {
if ($array && !is_array($this->options[$field])) {
if ($this->options[$field] === 'null') {
$this->$field = $default;
}
elseif ($array && !is_array($this->options[$field])) {
$this->$field = explode(',', $this->options[$field]);
}
else {
......@@ -317,6 +320,8 @@ class provisionServer extends provisionEnvironment {
$this->script_user = d('@server_master')->script_user;
}
$this->setProperty('ip_addresses', array(), true);
$this->backup_path = $this->aegir_root . '/backups';
$this->config_path = $this->aegir_root . '/config/' . ltrim($this->name, '@');
$this->include_path = $this->aegir_root . '/config/includes';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment