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()
{
$pages = Versioned::get_including_deleted(SiteTree::class);
$pages = $this->applyDefaultFilters($pages);
$pages = $pages->filterByCallback(function (SiteTree $page) {
return $page->isPublished();
});
return $pages;
return Versioned::get_including_deleted(SiteTree::class)
->innerJoin(
'SiteTree_Live',
'"SiteTree_Versions"."RecordID" = "SiteTree_Live"."ID"'
);
}
}