IcingaObjectAssignments: persist 'ignore' rules

This commit is contained in:
Thomas Gelf 2016-04-06 11:39:12 +02:00
parent 9db04c35ef
commit f7f73402d4
1 changed files with 5 additions and 16 deletions

View File

@ -49,28 +49,17 @@ class IcingaObjectAssignments
}
ksort($values);
foreach ((array) $values as $key => $value) {
if (is_numeric($key)) {
foreach ((array) $values as $type => $value) {
if (is_numeric($type)) {
$this->addRule($value);
} else {
if (is_string($value)) {
$this->addRule($value, $key);
$this->addRule($value, $type);
continue;
}
foreach ($value as $type => $strings) {
if (is_numeric($type)) {
$type = 'assign';
}
if (is_string($strings)) {
foreach ($value as $key => $strings) {
$this->addRule($strings, $type);
} else {
foreach ($strings as $string) {
$this->addRule($string, $type);
}
}
}
}
}