mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
#150 - Pages with similar content
#148 - Stable against restructures (from r87251) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89174 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7e54fc1fc2
commit
f84180813f
@ -1321,10 +1321,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
} else {
|
||||
$this->HasBrokenLink = true;
|
||||
}
|
||||
} else if($link == '' || $link[0] == '/') {
|
||||
$this->HasBrokenLink = true;
|
||||
} else if($candidateFile = File::find(Convert::raw2sql(urldecode($link)))) {
|
||||
$linkedFiles[] = $candidateFile->ID;
|
||||
} else if($link == '' || $link[0] == '/') {
|
||||
$this->HasBrokenLink = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,11 @@ class File extends DataObject {
|
||||
return $this->Name;
|
||||
}
|
||||
|
||||
// Used by AssetTableField
|
||||
function BackLinkTrackingCount() {
|
||||
return $this->BackLinkTracking()->Count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Event handler called before deleting from the database.
|
||||
* You can overload this to clean up or otherwise process data before delete this
|
||||
|
Loading…
Reference in New Issue
Block a user