And more formatting

This commit is contained in:
Michael 2021-05-08 19:30:09 +00:00
parent a0e455a493
commit 1e3182a896

View file

@ -45,13 +45,15 @@ class Context extends BaseApi
} }
$id = $parameters['id']; $id = $parameters['id'];
$parent = Post::selectFirst(['parent-uri-id'], ['uri-id' => $id]); $parent = Post::selectFirst(['parent-uri-id'], ['uri-id' => $id]);
if (!DBA::isResult($parent)) { if (!DBA::isResult($parent)) {
DI::mstdnError()->RecordNotFound(); DI::mstdnError()->RecordNotFound();
} }
$parents = []; $parents = [];
$children = []; $children = [];
$posts = Post::select(['uri-id', 'thr-parent-id'], ['parent-uri-id' => $parent['parent-uri-id']], [], false); $posts = Post::select(['uri-id', 'thr-parent-id'], ['parent-uri-id' => $parent['parent-uri-id']], [], false);
while ($post = Post::fetch($posts)) { while ($post = Post::fetch($posts)) {
if ($post['uri-id'] == $post['thr-parent-id']) { if ($post['uri-id'] == $post['thr-parent-id']) {