Faster queries, fixed foreign keys

When user is removed, their posts and comments get null user ID now
This commit is contained in:
Marcin Kurczewski
2013-10-19 18:14:19 +02:00
parent 53f9076bff
commit ea463cb0db
6 changed files with 70 additions and 31 deletions

View File

@ -40,7 +40,7 @@ class CommentController
$comments = $searchDbQuery->get();
$comments = R::convertToBeans('comment', $comments);
R::preload($comments, ['commenter' => 'user']);
R::preload($comments, ['commenter' => 'user', 'post', 'post.uploader' => 'user']);
$this->context->postGroups = true;
$this->context->transport->paginator = new StdClass;
$this->context->transport->paginator->page = $page;