From 57fc62eaf1dacf5b5cc9b774203fb20df616dee0 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 24 Jun 2015 18:57:07 +0930 Subject: [PATCH] Make sure discussion post IDs are ordered correctly --- framework/core/src/Api/Actions/Discussions/ShowAction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/src/Api/Actions/Discussions/ShowAction.php b/framework/core/src/Api/Actions/Discussions/ShowAction.php index 95b05a6c6..3d296b754 100644 --- a/framework/core/src/Api/Actions/Discussions/ShowAction.php +++ b/framework/core/src/Api/Actions/Discussions/ShowAction.php @@ -92,7 +92,7 @@ class ShowAction extends SerializeResourceAction $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)) { $length = strlen($prefix = 'posts.');