mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
commit
0a8cb64a5c
@ -233,7 +233,16 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
*/
|
*/
|
||||||
public function LinkPreview() {
|
public function LinkPreview() {
|
||||||
$record = $this->getRecord($this->currentPageID());
|
$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;
|
return $baseLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ class SS_Report extends ViewableData {
|
|||||||
return sprintf(
|
return sprintf(
|
||||||
'<a href="%s">%s</a>',
|
'<a href="%s">%s</a>',
|
||||||
Controller::join_links(singleton('CMSPageEditController')->Link('show'), $item->ID),
|
Controller::join_links(singleton('CMSPageEditController')->Link('show'), $item->ID),
|
||||||
Convert::raw2xml($value)
|
$value
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user