mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
IcingaObject(legacy): Fix alignLegacyProperties for long attributes
refs #12919
This commit is contained in:
parent
e368b32ec6
commit
b9e4162635
@ -2085,11 +2085,13 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||||||
foreach ($lines as &$line) {
|
foreach ($lines as &$line) {
|
||||||
if (preg_match('/^\s{4}([^\t]+)\t+(.+)$/', $line, $m)) {
|
if (preg_match('/^\s{4}([^\t]+)\t+(.+)$/', $line, $m)) {
|
||||||
if ($len - strlen($m[1]) < 0) {
|
if ($len - strlen($m[1]) < 0) {
|
||||||
var_dump($m);
|
$fill = ' ';
|
||||||
exit;
|
}
|
||||||
|
else {
|
||||||
|
$fill = str_repeat(' ', $len - strlen($m[1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
$line = ' ' . $m[1] . str_repeat(' ', $len - strlen($m[1])) . $m[2];
|
$line = ' ' . $m[1] . $fill . $m[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user