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();
|
$stageLink = $item->AbsoluteLink();
|
||||||
return sprintf('%s <a href="%s">%s</a>',
|
return sprintf('%s <a href="%s">%s</a>',
|
||||||
$stageLink,
|
$stageLink,
|
||||||
$liveLink ? $liveLink : $stageLink . '?stage=Stage',
|
$liveLink ? $liveLink : Controller::join_links($stageLink, '?stage=Stage'),
|
||||||
$liveLink ? '(live)' : '(draft)'
|
$liveLink ? '(live)' : '(draft)'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -92,8 +92,8 @@ class SideReportView extends ViewableData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(isset($info['link']) && $info['link']) {
|
if(isset($info['link']) && $info['link']) {
|
||||||
$linkBase = singleton('CMSPageEditController')->Link('show') . '/';
|
$linkBase = singleton('CMSPageEditController')->Link('show');
|
||||||
$link = ($info['link'] === true) ? $linkBase . $record->ID : $info['link'];
|
$link = ($info['link'] === true) ? Controller::join_links($linkBase, $record->ID) : $info['link'];
|
||||||
return $prefix . "<a $classClause href=\"$link\">$val</a>";
|
return $prefix . "<a $classClause href=\"$link\">$val</a>";
|
||||||
} else {
|
} else {
|
||||||
return $prefix . "<span $classClause>$val</span>";
|
return $prefix . "<span $classClause>$val</span>";
|
||||||
|
Loading…
Reference in New Issue
Block a user