IcingaObject: rendered disabled objects should...
...not break comments fixes #1263
This commit is contained in:
parent
e8533b90a2
commit
6b4c47a649
|
@ -27,6 +27,9 @@ master (will be 1.6.0)
|
|||
* FEATURE: It's now possible to dump data as fetched by an Import Source (#1626)
|
||||
* FIX: Director Health Check no longer warns about no Imports/Syncs/Jobs (#1607)
|
||||
|
||||
### Icinga Configuration
|
||||
* FIX: rendering of disabled objects containing `*/` has been fixed (#1263)
|
||||
|
||||
### Icinga Agent handling
|
||||
* FEATURE: Ship latest PowerShell module (#1632 )
|
||||
|
||||
|
|
|
@ -2468,7 +2468,8 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
|
||||
if ($this->isDisabled()) {
|
||||
return "/* --- This object has been disabled ---\n"
|
||||
. $str . "*/\n";
|
||||
// Do not allow strings to break our comment
|
||||
. str_replace('*/', "* /", $str) . "*/\n";
|
||||
} else {
|
||||
return $str;
|
||||
}
|
||||
|
|
|
@ -405,7 +405,9 @@ class IcingaService extends IcingaObject implements ExportInterface
|
|||
&& $this->get('host_id')
|
||||
&& $this->getRelated('host')->isDisabled()
|
||||
) {
|
||||
return "/* --- This services host has been disabled ---\n$str*/\n";
|
||||
return "/* --- This services host has been disabled ---\n"
|
||||
// Do not allow strings to break our comment
|
||||
. str_replace('*/', "* /", $str) . "*/\n";
|
||||
} else {
|
||||
return $str;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue