IcingaObjectAssignment: render numbers as numbers

This commit is contained in:
Thomas Gelf 2016-04-06 12:11:55 +02:00
parent f7f73402d4
commit 3e52585538
1 changed files with 8 additions and 1 deletions

View File

@ -111,13 +111,20 @@ class IcingaObjectAssignments
continue; continue;
} }
if (is_numeric($val['expression'])) {
$expression = $val['expression'];
} else {
$expression = '"' . addcslashes($val['expression'], '"') . '"';
}
$rows[$val['assign_type']][] = $this->rerenderFilter( $rows[$val['assign_type']][] = $this->rerenderFilter(
implode('', array( implode('', array(
$val['property'], $val['property'],
$val['operator'], $val['operator'],
'"' . addcslashes($val['expression'], '"') . '"' $expression,
)) ))
); );
} }
return $this->setValues($rows); return $this->setValues($rows);