From 89efa73195b1ccfeb174fc2c2d60c3ba0dae753a Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 11 Dec 2022 22:56:56 +0000 Subject: [PATCH] Fix tests --- src/Module/Api/Twitter/Followers/Ids.php | 2 ++ src/Module/Api/Twitter/Followers/Lists.php | 2 ++ src/Module/Api/Twitter/Friends/Ids.php | 2 ++ src/Module/Api/Twitter/Friends/Lists.php | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/Module/Api/Twitter/Followers/Ids.php b/src/Module/Api/Twitter/Followers/Ids.php index 3753a790a5..6f89b9ac1f 100644 --- a/src/Module/Api/Twitter/Followers/Ids.php +++ b/src/Module/Api/Twitter/Followers/Ids.php @@ -53,6 +53,8 @@ class Ids extends ContactEndpoint $condition = ['uid' => $uid, 'self' => false, 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]; + $total_count = (int)DBA::count('contact', $condition); + if (!empty($max_id)) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $max_id]); } diff --git a/src/Module/Api/Twitter/Followers/Lists.php b/src/Module/Api/Twitter/Followers/Lists.php index 9983cb4e53..68bc77b987 100644 --- a/src/Module/Api/Twitter/Followers/Lists.php +++ b/src/Module/Api/Twitter/Followers/Lists.php @@ -53,6 +53,8 @@ class Lists extends ContactEndpoint $condition = ['uid' => $uid, 'self' => false, 'rel' => [Contact::FOLLOWER, Contact::FRIEND]]; + $total_count = (int)DBA::count('contact', $condition); + if (!empty($max_id)) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $max_id]); } diff --git a/src/Module/Api/Twitter/Friends/Ids.php b/src/Module/Api/Twitter/Friends/Ids.php index 736c78fae2..1d15695d9d 100644 --- a/src/Module/Api/Twitter/Friends/Ids.php +++ b/src/Module/Api/Twitter/Friends/Ids.php @@ -53,6 +53,8 @@ class Ids extends ContactEndpoint $condition = ['uid' => $uid, 'self' => false, 'rel' => [Contact::SHARING, Contact::FRIEND]]; + $total_count = (int)DBA::count('contact', $condition); + if (!empty($max_id)) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $max_id]); } diff --git a/src/Module/Api/Twitter/Friends/Lists.php b/src/Module/Api/Twitter/Friends/Lists.php index 5d8b5bfaca..6a13dbef99 100644 --- a/src/Module/Api/Twitter/Friends/Lists.php +++ b/src/Module/Api/Twitter/Friends/Lists.php @@ -53,6 +53,8 @@ class Lists extends ContactEndpoint $condition = ['uid' => $uid, 'self' => false, 'rel' => [Contact::SHARING, Contact::FRIEND]]; + $total_count = (int)DBA::count('contact', $condition); + if (!empty($max_id)) { $condition = DBA::mergeConditions($condition, ["`pid` < ?", $max_id]); }