mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Fixed BacklinkTracking filter usage
Previous deprecation fixes made this method error out when called on the root node (ID=0), so when admin/assets is first called.
This commit is contained in:
parent
812a921072
commit
94d354de4a
@ -72,10 +72,13 @@ class SiteTreeFileExtension extends DataExtension {
|
||||
Please manipluate the returned list directly.', Deprecation::SCOPE_GLOBAL);
|
||||
}
|
||||
|
||||
$links = $this->owner->getManyManyComponents('BackLinkTracking')
|
||||
->where($filter)
|
||||
->sort($sort)
|
||||
->limit($limit);
|
||||
$links = $this->owner->getManyManyComponents('BackLinkTracking');
|
||||
if($this->owner->ID) {
|
||||
$links = $links
|
||||
->where($filter)
|
||||
->sort($sort)
|
||||
->limit($limit);
|
||||
}
|
||||
$this->owner->extend('updateBackLinkTracking', $links);
|
||||
|
||||
if(class_exists("Subsite")){
|
||||
|
Loading…
Reference in New Issue
Block a user