mirror of
https://github.com/flarum/core.git
synced 2025-08-04 07:27:39 +02:00
Ensure posts are sorted correctly
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user