<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
$params = ['order' => ['pid' => true], 'limit' => $count];
$condition = ['uid' => $uid, 'self' => false, 'pending' => false, 'rel' => [Contact::SHARING, Contact::FRIEND]];
-
+
$total_count = (int)DBA::count('contact', $condition);
if (!empty($max_id)) {
$condition = DBA::mergeConditions($condition, ["`pid` < ?", $max_id]);
}
-
+
if (!empty($since_id)) {
$condition = DBA::mergeConditions($condition, ["`pid` > ?", $since_id]);
}
-
+
if (!empty($min_id)) {
$condition = DBA::mergeConditions($condition, ["`pid` > ?", $min_id]);
-
+
$params['order'] = ['pid'];
}
-
+
$ids = [];
-
+
foreach (Contact::selectAccountToArray(['pid'], $condition, $params) as $follower) {
self::setBoundaries($follower['pid']);
$ids[] = $follower['pid'];