mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:42:53 +00:00
Changes after review
This commit is contained in:
parent
84b38beb9a
commit
82684cd6cd
3 changed files with 3 additions and 19 deletions
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue