IcingaObject(Legacy): Properly comment a disabled object

refs #12919
This commit is contained in:
Markus Frosch 2016-10-14 10:25:03 +02:00
parent a2151fd9d1
commit 1cedc64c5a
1 changed files with 4 additions and 2 deletions

View File

@ -2019,8 +2019,10 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
$str = $this->alignLegacyProperties($str);
if ($this->isDisabled()) {
return "/* --- This object has been disabled ---\n"
. $str . "*/\n";
return
"# --- This object has been disabled ---\n"
. preg_replace('~^~m', '# ', trim($str))
. "\n";
} else {
return $str;
}