mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Detect a brokenh link on an incompletely specified redirector page. (from r89043)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89215 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
07aefc8138
commit
675e841c6e
@ -94,7 +94,12 @@ class RedirectorPage extends Page {
|
||||
|
||||
function syncLinkTracking() {
|
||||
if ($this->RedirectionType == 'Internal') {
|
||||
$this->HasBrokenLink = DataObject::get_by_id('SiteTree', $this->LinkToID) ? false : true;
|
||||
if($this->LinkToID) {
|
||||
$this->HasBrokenLink = DataObject::get_by_id('SiteTree', $this->LinkToID) ? false : true;
|
||||
} else {
|
||||
// An incomplete redirector page definitely has a broken link
|
||||
$this->HasBrokenLink = true;
|
||||
}
|
||||
} else {
|
||||
// TODO implement checking of a remote site
|
||||
$this->HasBrokenLink = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user