allow using queryParam to disable filter

much better than global state (and should potentially replace cookie usage that is user controlled)
This commit is contained in:
Thomas Portelange 2018-08-16 16:20:48 +02:00 committed by GitHub
parent d8088edfa9
commit 6e35807dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,6 +153,9 @@ class GroupSubsites extends DataExtension implements PermissionProvider
if (Cookie::get('noSubsiteFilter') == 'true') {
return;
}
if ($dataQuery && $dataQuery->getQueryParam('Subsite.filter') === false) {
return;
}
// If you're querying by ID, ignore the sub-site - this is a bit ugly...
if (!$query->filtersOnID()) {