Changes after review

This commit is contained in:
Michael 2023-09-26 05:05:51 +00:00
parent 84b38beb9a
commit 82684cd6cd
3 changed files with 3 additions and 19 deletions

View file

@ -39,8 +39,8 @@ class Channel extends \Friendica\BaseRepository
/**
* Fetch a single user channel
*
* @param int $id
* @param int $uid
* @param int $id The id of the user defined channel
* @param int $uid The user that this channel belongs to. (Not part of the primary key)
* @return TimelineEntity
* @throws \Friendica\Network\HTTPException\NotFoundException
*/

View file

@ -478,22 +478,6 @@ class Circle
return $return;
}
public static function getByUID(int $uid): array
{
$circles = [];
$stmt = DBA::select('group', [], ['deleted' => false, 'uid' => $uid, 'cid' => null], ['order' => ['id']]);
while ($circle = DBA::fetch($stmt)) {
$circles[] = [
'id' => $circle['id'],
'name' => $circle['name'],
];
}
DBA::close($stmt);
return $circles;
}
/**
* Returns a templated circle selection list
*

View file

@ -120,7 +120,7 @@ class Channels extends BaseSettings
-2 => $this->l10n->t('Followers'),
];
foreach (Circle::getByUID($uid) as $circle) {
foreach (Circle::getByUserId($uid) as $circle) {
$circles[$circle['id']] = $circle['name'];
}