Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
allow disabling filter using queryParam
It is much better than relying on global state
  • Loading branch information
lekoala committed Aug 16, 2018
1 parent d8088ed commit c177a9f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Extensions/FileSubsites.php
Expand Up @@ -52,6 +52,9 @@ public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null)
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
Expand Down

0 comments on commit c177a9f

Please sign in to comment.