Merge pull request #10417 from annando/context-select

Context: use the correct "select functionality
This commit is contained in:
Hypolite Petovan 2021-06-19 23:02:21 -04:00 committed by GitHub
commit 88b50313c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,8 +58,8 @@ class Context extends BaseApi
$parents = [];
$children = [];
$posts = Post::select(['uri-id', 'thr-parent-id'],
['parent-uri-id' => $parent['parent-uri-id'], 'gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT]], [], false);
$posts = Post::selectPosts(['uri-id', 'thr-parent-id'],
['parent-uri-id' => $parent['parent-uri-id'], 'gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT]], []);
while ($post = Post::fetch($posts)) {
if ($post['uri-id'] == $post['thr-parent-id']) {
continue;