mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #528 from kinglozzer/injector
Use Injector for creating paginated list of blog posts
This commit is contained in:
commit
66c7881410
@ -1030,7 +1030,7 @@ class Blog_Controller extends Page_Controller
|
|||||||
{
|
{
|
||||||
$allPosts = $this->blogPosts ?: new ArrayList();
|
$allPosts = $this->blogPosts ?: new ArrayList();
|
||||||
|
|
||||||
$posts = new PaginatedList($allPosts);
|
$posts = PaginatedList::create($allPosts);
|
||||||
|
|
||||||
// Set appropriate page size
|
// Set appropriate page size
|
||||||
if ($this->PostsPerPage > 0) {
|
if ($this->PostsPerPage > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user