]> git.mxchange.org Git - friendica.git/commitdiff
Use the id instead of iid
authorMichael <heluecht@pirati.ca>
Thu, 4 Feb 2021 22:51:33 +0000 (22:51 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 4 Feb 2021 22:51:33 +0000 (22:51 +0000)
include/api.php
tests/datasets/api.fixture.php

index 1cb1880b448955745b5fcf124fe9071f7eee93d9..69c8ace2bc36c9099067f2acef00a7e3fc5dfc88 100644 (file)
@@ -1810,15 +1810,15 @@ function api_statuses_networkpublic_timeline($type)
 
        $start = max(0, ($page - 1) * $count);
 
-       $condition = ["`uid` = 0 AND `gravity` IN (?, ?) AND `iid` > ? AND `private` = ?",
+       $condition = ["`uid` = 0 AND `gravity` IN (?, ?) AND `id` > ? AND `private` = ?",
                GRAVITY_PARENT, GRAVITY_COMMENT, $since_id, Item::PUBLIC];
 
        if ($max_id > 0) {
-               $condition[0] .= " AND `iid` <= ?";
+               $condition[0] .= " AND `id` <= ?";
                $condition[] = $max_id;
        }
 
-       $params = ['order' => ['iid' => true], 'limit' => [$start, $count]];
+       $params = ['order' => ['id' => true], 'limit' => [$start, $count]];
        $statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
 
        $ret = api_format_items(Post::toArray($statuses), $user_info, false, $type);
index 3e9e53164691e0a105c1ad999c668224d75f0f08..407629709d780bd23532fefd72ee12f324dbde9e 100644 (file)
@@ -320,6 +320,7 @@ return [
                        'parent-uri'  => '1',
                        'thr-parent-id' => 1,
                        'thr-parent'  => '1',
+                       'private'     => 0,
                        'gravity'     => GRAVITY_PARENT,
                        'author-link' => 'http://localhost/profile/selfcontact',
                        'wall'        => 1,
@@ -348,6 +349,7 @@ return [
                        'parent-uri'  => '1',
                        'thr-parent-id' => 1,
                        'thr-parent'  => '1',
+                       'private'     => 0,
                        'gravity'     => GRAVITY_COMMENT,
                        'author-link' => 'http://localhost/profile/selfcontact',
                        'wall'        => 1,
@@ -372,6 +374,7 @@ return [
                        'parent-uri'  => '3',
                        'thr-parent-id' => 3,
                        'thr-parent'  => '3',
+                       'private'     => 0,
                        'gravity'     => GRAVITY_PARENT,
                        'author-link' => 'http://localhost/profile/othercontact',
                        'wall'        => 1,
@@ -397,6 +400,7 @@ return [
                        'parent-uri'  => '1',
                        'thr-parent-id' => 1,
                        'thr-parent'  => '1',
+                       'private'     => 0,
                        'gravity'     => GRAVITY_COMMENT,
                        'author-link' => 'http://localhost/profile/othercontact',
                        'wall'        => 1,
@@ -422,6 +426,7 @@ return [
                        'parent-uri'  => '1',
                        'thr-parent-id' => 1,
                        'thr-parent'  => '1',
+                       'private'     => 0,
                        'gravity'     => GRAVITY_COMMENT,
                        'author-link' => 'http://localhost/profile/othercontact',
                        'wall'        => 1,
@@ -450,6 +455,7 @@ return [
                        'parent-uri'  => '6',
                        'thr-parent-id' => 6,
                        'thr-parent'  => '6',
+                       'private'     => 0,
                        'gravity'     => GRAVITY_PARENT,
                        'author-link' => 'http://localhost/profile/othercontact',
                        'wall'        => 1,