Merge pull request #381 from lekoala/patch-1

allow disabling filter using queryParam
This commit is contained in:
Robbie Averill 2018-08-24 08:50:47 +12:00 committed by GitHub
commit 6747b5ffe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ class FileSubsites extends DataExtension
if (Subsite::$disable_subsite_filter) {
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)
// @TODO I don't think excluding if SiteTree_ImageTracking is a good idea however because of the SS 3.0 api and