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';
|
$classes[] = 'logfile';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$type = $object->getShortTableName();
|
||||||
|
|
||||||
$plain = Html::wantHtml($file->getContent())->render();
|
$plain = Html::wantHtml($file->getContent())->render();
|
||||||
$plain = preg_replace_callback(
|
$plain = preg_replace_callback(
|
||||||
'/^(\s+import\s+\"\;)(.+)(\"\;)/m',
|
'/^(\s+import\s+\"\;)(.+)(\"\;)/m',
|
||||||
[$this, 'linkImport'],
|
[$this, 'linkImport'],
|
||||||
$plain
|
$plain
|
||||||
);
|
);
|
||||||
$plain = preg_replace_callback(
|
|
||||||
'/^(\s+(?:check_|event_)?command\s+=\s+\"\;)(.+)(\"\;)/m',
|
if ($type !== 'command') {
|
||||||
[$this, 'linkCommand'],
|
$plain = preg_replace_callback(
|
||||||
$plain
|
'/^(\s+(?:check_|event_)?command\s+=\s+\"\;)(.+)(\"\;)/m',
|
||||||
);
|
[$this, 'linkCommand'],
|
||||||
|
$plain
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$plain = preg_replace_callback(
|
$plain = preg_replace_callback(
|
||||||
'/^(\s+host_name\s+=\s+\"\;)(.+)(\"\;)/m',
|
'/^(\s+host_name\s+=\s+\"\;)(.+)(\"\;)/m',
|
||||||
[$this, 'linkHost'],
|
[$this, 'linkHost'],
|
||||||
|
|
Loading…
Reference in New Issue