mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 23:53:42 +08:00
Make sure discussion post IDs are ordered correctly
This commit is contained in:
parent
4624ddb849
commit
57fc62eaf1
|
@ -92,7 +92,7 @@ class ShowAction extends SerializeResourceAction
|
||||||
|
|
||||||
$discussion = $this->discussions->findOrFail($request->get('id'), $user);
|
$discussion = $this->discussions->findOrFail($request->get('id'), $user);
|
||||||
|
|
||||||
$discussion->posts_ids = $discussion->visiblePosts($user)->lists('id');
|
$discussion->posts_ids = $discussion->visiblePosts($user)->orderBy('time')->lists('id');
|
||||||
|
|
||||||
if (in_array('posts', $request->include)) {
|
if (in_array('posts', $request->include)) {
|
||||||
$length = strlen($prefix = 'posts.');
|
$length = strlen($prefix = 'posts.');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user