ObjectPreview: Avoid linking a flat command attribute inside a command
This commit is contained in:
parent
e64ace7ccf
commit
a6e32d763f
|
@ -99,17 +99,23 @@ class ObjectPreview
|
|||
$classes[] = 'logfile';
|
||||
}
|
||||
|
||||
$type = $object->getShortTableName();
|
||||
|
||||
$plain = Html::wantHtml($file->getContent())->render();
|
||||
$plain = preg_replace_callback(
|
||||
'/^(\s+import\s+\"\;)(.+)(\"\;)/m',
|
||||
[$this, 'linkImport'],
|
||||
$plain
|
||||
);
|
||||
|
||||
if ($type !== 'command') {
|
||||
$plain = preg_replace_callback(
|
||||
'/^(\s+(?:check_|event_)?command\s+=\s+\"\;)(.+)(\"\;)/m',
|
||||
[$this, 'linkCommand'],
|
||||
$plain
|
||||
);
|
||||
}
|
||||
|
||||
$plain = preg_replace_callback(
|
||||
'/^(\s+host_name\s+=\s+\"\;)(.+)(\"\;)/m',
|
||||
[$this, 'linkHost'],
|
||||
|
|
Loading…
Reference in New Issue