mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-24 16:49:34 -05:00
HostServiceTermValidator:isValid(): Add missing return statement
This commit is contained in:
parent
35d151b70d
commit
7346cd1cab
1 changed files with 6 additions and 0 deletions
|
|
@ -44,6 +44,7 @@ class HostServiceTermValidator extends BaseValidator
|
|||
$terms = [$terms];
|
||||
}
|
||||
|
||||
$isValid = true;
|
||||
$testConfig = new BpConfig();
|
||||
|
||||
foreach ($terms as $term) {
|
||||
|
|
@ -60,6 +61,7 @@ class HostServiceTermValidator extends BaseValidator
|
|||
|
||||
if ($this->parent->hasChild($term->getSearchValue())) {
|
||||
$term->setMessage($this->translate('Already defined in this process'));
|
||||
$isValid = false;
|
||||
} else {
|
||||
$testConfig->getNode('__unbound__')
|
||||
->addChild($node);
|
||||
|
|
@ -81,10 +83,14 @@ class HostServiceTermValidator extends BaseValidator
|
|||
} else {
|
||||
$term->setMessage($this->translate('Host not found'));
|
||||
}
|
||||
|
||||
$isValid = false;
|
||||
} else {
|
||||
$term->setLabel($node->getAlias());
|
||||
$term->setClass($node->getObjectClassName());
|
||||
}
|
||||
}
|
||||
|
||||
return $isValid;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue