Fixes to preloading

This commit is contained in:
Marcin Kurczewski 2013-11-30 16:19:48 +01:00
parent 31ccb9a281
commit 4285aff671
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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;