Merge pull request #2539 from silverstripe-terraformers/bugfix/published-pages-filter

BUG: Published pages filter correction (missing default filter)
This commit is contained in:
Andre Kiste 2020-04-17 00:04:16 +12:00 committed by GitHub
commit 6257156999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,10 +41,14 @@ class CMSSiteTreeFilter_PublishedPages extends CMSSiteTreeFilter
*/
public function getFilteredPages()
{
return Versioned::get_including_deleted(SiteTree::class)
$pages = Versioned::get_including_deleted(SiteTree::class)
->innerJoin(
'SiteTree_Live',
'"SiteTree_Versions"."RecordID" = "SiteTree_Live"."ID"'
);
$pages = $this->applyDefaultFilters($pages);
return $pages;
}
}