mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Disable subsites filtering in File->BackLinkTracking() if module is installed (AIR-66)
This commit is contained in:
parent
e57be3f6e4
commit
d03724e116
@ -13,6 +13,27 @@ class SiteTreeFileExtension extends DataExtension {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend through {@link updateBackLinkTracking()} in your own {@link Extension}.
|
||||
*
|
||||
* @return ComponentSet
|
||||
*/
|
||||
function BackLinkTracking($filter = "", $sort = "", $join = "", $limit = "") {
|
||||
if(class_exists("Subsite")){
|
||||
$rememberSubsiteFilter = Subsite::$disable_subsite_filter;
|
||||
Subsite::disable_subsite_filter(true);
|
||||
}
|
||||
|
||||
$links = $this->owner->getManyManyComponents('BackLinkTracking', $filter, $sort, $join, $limit);
|
||||
$this->owner->extend('updateBackLinkTracking', $links);
|
||||
|
||||
if(class_exists("Subsite")){
|
||||
Subsite::disable_subsite_filter($rememberSubsiteFilter);
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Unnecessary shortcut for AssetTableField, coupled with cms module.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user