Use Injector for creating paginated list of blog posts

This commit is contained in:
Loz Calver 2018-04-16 11:54:45 +01:00 committed by Guy
parent 2da2c2927f
commit 0a8235615d
No known key found for this signature in database
GPG Key ID: A80F9ACCB86D3DA7

View File

@ -1031,7 +1031,7 @@ class Blog_Controller extends Page_Controller
{
$allPosts = $this->blogPosts ?: new ArrayList();
$posts = new PaginatedList($allPosts);
$posts = PaginatedList::create($allPosts);
// Set appropriate page size
if ($this->PostsPerPage > 0) {