mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUG Don't convert datalist to arraylist when filtering pages
Fixes #2354
This commit is contained in:
parent
9ccba1b0bb
commit
9ced23473f
@ -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"'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user