IcingaCommand: allow underscore in constant names

This commit is contained in:
Thomas Gelf 2016-04-01 14:08:27 +02:00
parent 03d739170c
commit 65b048d78b

View File

@ -78,7 +78,7 @@ class IcingaCommand extends IcingaObject
{ {
$command = $this->command; $command = $this->command;
$prefix = ''; $prefix = '';
if (preg_match('~^([A-Z][A-Za-z0-9]+\s\+\s)(.+?)$~', $command, $m)) { if (preg_match('~^([A-Z][A-Za-z0-9_]+\s\+\s)(.+?)$~', $command, $m)) {
$prefix = $m[1]; $prefix = $m[1];
$command = $m[2]; $command = $m[2];
} elseif ($command[0] !== '/') { } elseif ($command[0] !== '/') {