diff --git a/src/Content/Conversation/Repository/Channel.php b/src/Content/Conversation/Repository/Channel.php index 897bec8c2..2c5bb3179 100644 --- a/src/Content/Conversation/Repository/Channel.php +++ b/src/Content/Conversation/Repository/Channel.php @@ -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 */ diff --git a/src/Model/Circle.php b/src/Model/Circle.php index 2233b58b0..2b32103db 100644 --- a/src/Model/Circle.php +++ b/src/Model/Circle.php @@ -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 * diff --git a/src/Module/Settings/Channels.php b/src/Module/Settings/Channels.php index 4e2c8f5f1..39d83a7e0 100644 --- a/src/Module/Settings/Channels.php +++ b/src/Module/Settings/Channels.php @@ -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']; }