IcingaConfigHelper: always render $user.*$ and...
...$notification.*$ as macros fixes #1176
This commit is contained in:
parent
bc8af635e8
commit
77290c3bf3
|
@ -318,6 +318,17 @@ class IcingaConfigHelper
|
|||
static::renderString($string)
|
||||
);
|
||||
|
||||
// TODO: this is an exemption for special variables. It would
|
||||
// never make any sense to evaluate them at parse time.
|
||||
// Another issue remains: there might be other reasons
|
||||
// for "late evaluation". But how to distinguish those
|
||||
// use cases?
|
||||
$string = preg_replace(
|
||||
'/" \+ ((?:user|notification)\.[\w\.]+) \+ "/',
|
||||
'\$${1}\$',
|
||||
$string
|
||||
);
|
||||
|
||||
if (substr($string, 0, 5) === '"" + ') {
|
||||
$string = substr($string, 5);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue