Fixes to preloading
This commit is contained in:
parent
31ccb9a281
commit
4285aff671
2 changed files with 2 additions and 2 deletions
|
@ -107,7 +107,7 @@ class PostController
|
|||
list($posts, $postCount) = Model_Post::getEntitiesWithCount($query, $postsPerPage, $page);
|
||||
$pageCount = ceil($postCount / $postsPerPage);
|
||||
$page = min($pageCount, $page);
|
||||
R::preload($posts, 'sharedTag');
|
||||
R::preload($posts, 'sharedTag|tag');
|
||||
|
||||
$this->context->transport->paginator = new StdClass;
|
||||
$this->context->transport->paginator->page = $page;
|
||||
|
|
|
@ -439,7 +439,7 @@ class UserController
|
|||
$page = max(1, $page);
|
||||
list ($posts, $postCount) = Model_Post::getEntitiesWithCount($query, $postsPerPage, $page);
|
||||
$pageCount = ceil($postCount / $postsPerPage);
|
||||
R::preload($posts, 'sharedTag');
|
||||
R::preload($posts, 'sharedTag|tag');
|
||||
|
||||
$this->context->transport->tab = $tab;
|
||||
$this->context->transport->lastSearchQuery = $query;
|
||||
|
|
Loading…
Reference in a new issue