mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #2370 from tractorcow/pulls/4.2/published-filter-page
BUG Don't convert datalist to arraylist when filtering pages
This commit is contained in:
commit
eb62e11d75
@ -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