monitoring: Fix Icinga 2 version detection in the toggle object features command form

This commit is contained in:
Eric Lippmann 2016-01-28 14:45:39 +01:00
parent 4df7fdea88
commit 9bc9b78643

View File

@ -59,7 +59,7 @@ class ToggleObjectFeaturesCommandForm extends ObjectsCommandForm
'permission' => 'monitoring/command/feature/object/flap-detection'
)
);
if (preg_match('~^v2\.\d+\.\d+.*$~', $this->getIcingaVersion())) {
if (preg_match('~^[vr]2\.\d+\.\d+.*$~', $this->getIcingaVersion())) {
unset($features[ToggleObjectFeatureCommand::FEATURE_OBSESSING]);
}
$this->features = $features;