ProcessCheckResultCommandForm: Use substr instead of pregmatch

refs #9672
This commit is contained in:
Alexander Fuhr 2015-08-04 13:54:30 +02:00
parent 18f382e85e
commit b5ae4599fd
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
ProcessCheckResultCommand::HOST_DOWN => $this->translate('DOWN', 'icinga.state')
);
if (! preg_match('~^v2\.\d+\.\d+.*$~', $this->getBackend()->getProgramVersion())) {
if (substr($this->getBackend()->getProgramVersion(), 0, 2) !== 'v2') {
$options[ProcessCheckResultCommand::HOST_UNREACHABLE] = $this->translate('UNREACHABLE', 'icinga.state');
}