mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
commit
0a8cb64a5c
@ -227,13 +227,22 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function LinkPreview() {
|
||||
$record = $this->getRecord($this->currentPageID());
|
||||
$baseLink = ($record && $record instanceof Page) ? $record->Link('?stage=Stage') : Director::absoluteBaseURL();
|
||||
$baseLink = Director::absoluteBaseURL();
|
||||
if ($record && $record instanceof Page) {
|
||||
// if we are an external redirector don't show a link
|
||||
if ($record instanceof RedirectorPage && $record->RedirectionType == 'External') {
|
||||
$baseLink = false;
|
||||
}
|
||||
else {
|
||||
$baseLink = $record->Link('?stage=Stage');
|
||||
}
|
||||
}
|
||||
return $baseLink;
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ class SS_Report extends ViewableData {
|
||||
return sprintf(
|
||||
'<a href="%s">%s</a>',
|
||||
Controller::join_links(singleton('CMSPageEditController')->Link('show'), $item->ID),
|
||||
Convert::raw2xml($value)
|
||||
$value
|
||||
);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user