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

View File

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