BUGFIX Disable subsites filtering in File->BackLinkTracking() if module is installed (AIR-66)

This commit is contained in:
Ingo Schommer 2011-10-06 16:13:16 +02:00
parent e57be3f6e4
commit d03724e116

View File

@ -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. * @todo Unnecessary shortcut for AssetTableField, coupled with cms module.
* *