Merge pull request #1165 from dhensby/pulls/fixes

Pulls/fixes
This commit is contained in:
Damian Mooyman 2015-02-13 11:54:26 +13:00
commit 0a8cb64a5c
2 changed files with 12 additions and 3 deletions

View File

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

View File

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