mirror of
https://github.com/friendica/friendica
synced 2025-04-30 11:04:29 +02:00
Happy New Year 2023!
This commit is contained in:
parent
7942881f7e
commit
1874a32728
1139 changed files with 1261 additions and 1261 deletions
|
@ -1,6 +1,6 @@
|
|||
<?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
|
||||
*
|
||||
|
@ -60,23 +60,23 @@ class Followers extends BaseApi
|
|||
$params = ['order' => ['pid' => true], 'limit' => $request['limit']];
|
||||
|
||||
$condition = ['uid' => $uid, 'self' => false, 'rel' => [Contact::FOLLOWER, Contact::FRIEND]];
|
||||
|
||||
|
||||
if (!empty($request['max_id'])) {
|
||||
$condition = DBA::mergeConditions($condition, ["`pid` < ?", $request['max_id']]);
|
||||
}
|
||||
|
||||
|
||||
if (!empty($request['since_id'])) {
|
||||
$condition = DBA::mergeConditions($condition, ["`pid` > ?", $request['since_id']]);
|
||||
}
|
||||
|
||||
|
||||
if (!empty($request['min_id'])) {
|
||||
$condition = DBA::mergeConditions($condition, ["`pid` > ?", $request['min_id']]);
|
||||
|
||||
|
||||
$params['order'] = ['pid'];
|
||||
}
|
||||
|
||||
|
||||
$accounts = [];
|
||||
|
||||
|
||||
foreach (Contact::selectAccountToArray(['pid'], $condition, $params) as $follower) {
|
||||
self::setBoundaries($follower['pid']);
|
||||
$accounts[] = DI::mstdnAccount()->createFromContactId($follower['pid'], $uid);
|
||||
|
@ -85,23 +85,23 @@ class Followers extends BaseApi
|
|||
$params = ['order' => ['relation-cid' => true], 'limit' => $request['limit']];
|
||||
|
||||
$condition = ['cid' => $id, 'follows' => true];
|
||||
|
||||
|
||||
if (!empty($request['max_id'])) {
|
||||
$condition = DBA::mergeConditions($condition, ["`relation-cid` < ?", $request['max_id']]);
|
||||
}
|
||||
|
||||
|
||||
if (!empty($request['since_id'])) {
|
||||
$condition = DBA::mergeConditions($condition, ["`relation-cid` > ?", $request['since_id']]);
|
||||
}
|
||||
|
||||
|
||||
if (!empty($request['min_id'])) {
|
||||
$condition = DBA::mergeConditions($condition, ["`relation-cid` > ?", $request['min_id']]);
|
||||
|
||||
|
||||
$params['order'] = ['relation-cid'];
|
||||
}
|
||||
|
||||
|
||||
$accounts = [];
|
||||
|
||||
|
||||
$followers = DBA::select('contact-relation', ['relation-cid'], $condition, $params);
|
||||
while ($follower = DBA::fetch($followers)) {
|
||||
self::setBoundaries($follower['relation-cid']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue