FIX Use Controller::join_links() in Reports

This commit is contained in:
Daniel Hensby 2016-03-10 16:38:42 +00:00
parent 11aadbe1d0
commit bc31d9ca9c
2 changed files with 3 additions and 3 deletions

View File

@ -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)'
);
}

View File

@ -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>";