From: Michael Date: Sun, 11 Dec 2022 22:56:56 +0000 (+0000) Subject: Fix tests X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=89efa73195b1ccfeb174fc2c2d60c3ba0dae753a;p=friendica.git Fix tests --- 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]); }