mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1422 from dhensby/pulls/report-links
FIX Use `Controller::join_links()` in Reports
This commit is contained in:
commit
5dc30bc79b
@ -104,7 +104,7 @@ class BrokenLinksReport extends SS_Report {
|
||||
$stageLink = $item->AbsoluteLink();
|
||||
return sprintf('%s <a href="%s">%s</a>',
|
||||
$stageLink,
|
||||
$liveLink ? $liveLink : $stageLink . '?stage=Stage',
|
||||
$liveLink ? $liveLink : Controller::join_links($stageLink, '?stage=Stage'),
|
||||
$liveLink ? '(live)' : '(draft)'
|
||||
);
|
||||
}
|
||||
|
@ -92,8 +92,8 @@ class SideReportView extends ViewableData {
|
||||
}
|
||||
|
||||
if(isset($info['link']) && $info['link']) {
|
||||
$linkBase = singleton('CMSPageEditController')->Link('show') . '/';
|
||||
$link = ($info['link'] === true) ? $linkBase . $record->ID : $info['link'];
|
||||
$linkBase = singleton('CMSPageEditController')->Link('show');
|
||||
$link = ($info['link'] === true) ? Controller::join_links($linkBase, $record->ID) : $info['link'];
|
||||
return $prefix . "<a $classClause href=\"$link\">$val</a>";
|
||||
} else {
|
||||
return $prefix . "<span $classClause>$val</span>";
|
||||
|
Loading…
Reference in New Issue
Block a user