mirror of
https://github.com/silverstripe/silverstripe-externallinks.git
synced 2024-10-22 15:05:44 +00:00
FIX Check if page exists
This commit is contained in:
parent
72d77a00c2
commit
03b47fb8eb
@ -35,11 +35,19 @@ class BrokenExternalLinksReport extends SS_Report {
|
||||
"title" => 'Page link is on',
|
||||
'formatting' => function($value, $item) {
|
||||
$page = $item->Page();
|
||||
return sprintf(
|
||||
'<a href="%s">%s</a>',
|
||||
Convert::raw2att($page->CMSEditLink()),
|
||||
Convert::raw2xml($page->Title)
|
||||
);
|
||||
|
||||
if ($page) {
|
||||
return sprintf(
|
||||
'<a href="%s">%s</a>',
|
||||
Convert::raw2att($page->CMSEditLink()),
|
||||
Convert::raw2xml($page->Title)
|
||||
);
|
||||
} else {
|
||||
return sprintf(
|
||||
'%s',
|
||||
$item->Track()->PageID
|
||||
);
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user