mirror of
https://github.com/flarum/core.git
synced 2025-10-16 17:27:05 +02:00
merges 5.5 and master into next-back
This commit is contained in:
@@ -152,7 +152,7 @@ class PostRepository
|
||||
{
|
||||
$discussions = $this->getDiscussionsForPosts($ids, $actor);
|
||||
|
||||
return Post::whereIn('id', $ids)
|
||||
$posts = Post::whereIn('id', $ids)
|
||||
->where(function ($query) use ($discussions, $actor) {
|
||||
foreach ($discussions as $discussion) {
|
||||
$query->orWhere(function ($query) use ($discussion, $actor) {
|
||||
@@ -164,6 +164,12 @@ class PostRepository
|
||||
|
||||
$query->orWhereRaw('FALSE');
|
||||
});
|
||||
|
||||
foreach ($posts as $post) {
|
||||
$post->discussion = $discussions->find($post->discussion_id);
|
||||
}
|
||||
|
||||
return $posts;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user