]> git.mxchange.org Git - friendica.git/commitdiff
Changes after review
authorMichael <heluecht@pirati.ca>
Tue, 26 Sep 2023 05:05:51 +0000 (05:05 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 26 Sep 2023 05:05:51 +0000 (05:05 +0000)
src/Content/Conversation/Repository/Channel.php
src/Model/Circle.php
src/Module/Settings/Channels.php

index 897bec8c292de4a36d3a32dcc5121b0669b8a3a7..2c5bb31799639cb6e4a22784f6e7615c57e063e0 100644 (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
         */
index 2233b58b0cf93df7fb5945f72b268dc05b466e70..2b32103db99715a56e0f8d9dd36fca9e61cb6b45 100644 (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
         *
index 4e2c8f5f154fe4428a678646194a571318197b61..39d83a7e00a004f98d4ce68d1c6e4e46c241a4e5 100644 (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'];
                }