Merge branch '4.3' into 4

This commit is contained in:
Robbie Averill 2019-01-29 14:03:59 +02:00
commit 2533e729fc

View File

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