mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge branch '4.3' into 4
This commit is contained in:
commit
2533e729fc
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user