mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 05:53:37 +08:00
Make sure we don't accidentally load all of a discussion's posts
This commit is contained in:
parent
5be607a6a7
commit
8d50251ec5
@ -99,7 +99,7 @@ class AddPostFlagsRelationship
|
||||
// models) so that we can selectively expose only the flags that the
|
||||
// user has permission to view.
|
||||
if ($event->isController(Controller\ShowDiscussionController::class)) {
|
||||
$posts = $event->data->posts;
|
||||
$posts = $event->data->getRelation('posts');
|
||||
}
|
||||
|
||||
if ($event->isController(Controller\ListPostsController::class)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user