mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
allow disabling filter using queryParam
It is much better than relying on global state
This commit is contained in:
parent
d8088edfa9
commit
c177a9f640
@ -52,6 +52,9 @@ class FileSubsites extends DataExtension
|
|||||||
if (Subsite::$disable_subsite_filter) {
|
if (Subsite::$disable_subsite_filter) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ($dataQuery && $dataQuery->getQueryParam('Subsite.filter') === false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If you're querying by ID, ignore the sub-site - this is a bit ugly... (but it was WAYYYYYYYYY worse)
|
// If you're querying by ID, ignore the sub-site - this is a bit ugly... (but it was WAYYYYYYYYY worse)
|
||||||
// @TODO I don't think excluding if SiteTree_ImageTracking is a good idea however because of the SS 3.0 api and
|
// @TODO I don't think excluding if SiteTree_ImageTracking is a good idea however because of the SS 3.0 api and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user