mirror of
https://github.com/friendica/friendica
synced 2024-12-22 08:09:45 +01:00
commit
dc36d070c5
2 changed files with 10 additions and 5 deletions
|
@ -188,12 +188,14 @@ function display_content(App $a, $update = false, $update_uid = 0)
|
||||||
if ($update) {
|
if ($update) {
|
||||||
$uri_id = $_REQUEST['uri_id'];
|
$uri_id = $_REQUEST['uri_id'];
|
||||||
$item = Post::selectFirst(['uid', 'parent-uri-id'], ['uri-id' => $uri_id, 'uid' => $update_uid]);
|
$item = Post::selectFirst(['uid', 'parent-uri-id'], ['uri-id' => $uri_id, 'uid' => $update_uid]);
|
||||||
|
if (!empty($item)) {
|
||||||
if ($item['uid'] != 0) {
|
if ($item['uid'] != 0) {
|
||||||
$a->profile = ['uid' => intval($item['uid'])];
|
$a->profile = ['uid' => intval($item['uid'])];
|
||||||
} else {
|
} else {
|
||||||
$a->profile = ['uid' => intval($update_uid)];
|
$a->profile = ['uid' => intval($update_uid)];
|
||||||
}
|
}
|
||||||
$parent_uri_id = $item['parent-uri-id'];
|
$parent_uri_id = $item['parent-uri-id'];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$uri_id = (($a->argc > 2) ? $a->argv[2] : 0);
|
$uri_id = (($a->argc > 2) ? $a->argv[2] : 0);
|
||||||
$parent_uri_id = $uri_id;
|
$parent_uri_id = $uri_id;
|
||||||
|
|
|
@ -359,6 +359,9 @@ class Community extends BaseModule
|
||||||
$r = Post::selectThreadForUser(0, ['uri-id', 'commented', 'author-link'], $condition, $params);
|
$r = Post::selectThreadForUser(0, ['uri-id', 'commented', 'author-link'], $condition, $params);
|
||||||
|
|
||||||
$items = Post::toArray($r);
|
$items = Post::toArray($r);
|
||||||
|
if (empty($items)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
// Previous page case: once we get the relevant items closest to min_id, we need to restore the expected display order
|
// Previous page case: once we get the relevant items closest to min_id, we need to restore the expected display order
|
||||||
if (empty($item_id) && isset($min_id) && !isset($max_id)) {
|
if (empty($item_id) && isset($min_id) && !isset($max_id)) {
|
||||||
|
|
Loading…
Reference in a new issue