From: Michael Date: Tue, 26 Sep 2023 05:05:51 +0000 (+0000) Subject: Changes after review X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=82684cd6cd4e6aa44cdd04241c6999c25cf0af28;p=friendica.git Changes after review --- diff --git a/src/Content/Conversation/Repository/Channel.php b/src/Content/Conversation/Repository/Channel.php index 897bec8c29..2c5bb31799 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 2233b58b0c..2b32103db9 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 4e2c8f5f15..39d83a7e00 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']; }