mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 16:23:16 +08:00
Ensure posts are sorted correctly
This commit is contained in:
parent
a3f0bc9bff
commit
f67b7fda6a
|
@ -89,7 +89,7 @@ class PostRepository
|
|||
|
||||
$posts = Post::with('discussion')->whereIn('id', $visibleIds)->get();
|
||||
|
||||
$posts->sort(function ($a, $b) use ($ids) {
|
||||
$posts = $posts->sort(function ($a, $b) use ($ids) {
|
||||
$aPos = array_search($a->id, $ids);
|
||||
$bPos = array_search($b->id, $ids);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user