mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Ensure posts are sorted correctly
This commit is contained in:
parent
2b812ab211
commit
a32250884c
|
@ -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