]> git.mxchange.org Git - friendica.git/commitdiff
Remove lingering reference to group_member.uid
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 16 Dec 2017 16:50:58 +0000 (11:50 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Sat, 16 Dec 2017 16:50:58 +0000 (11:50 -0500)
src/Model/Group.php

index 542827151039e72bcf31a982c4083b52a8534259..26bab7f45bca4b5828e5a5f3d4936c4658fbb0cb 100644 (file)
@@ -57,15 +57,12 @@ class Group extends BaseObject
        /**
         * @brief Get a list of group ids a contact belongs to
         *
-        * @todo Get rid of $uid, the contact id already bears the information
-        *
-        * @param int $uid
         * @param int $cid
         * @return array
         */
-       private static function getByContactIdForUserId($uid, $cid)
+       private static function getIdsByContactId($cid)
        {
-               $condition = ['uid' => $uid, 'contact-id' => $cid];
+               $condition = ['contact-id' => $cid];
                $stmt = dba::select('group_member', ['gid'], $condition);
 
                $return = [];
@@ -369,7 +366,7 @@ class Group extends BaseObject
 
                $member_of = array();
                if ($cid) {
-                       $member_of = self::getByContactIdForUserId(local_user(), $cid);
+                       $member_of = self::getIdsByContactId($cid);
                }
 
                while ($group = dba::fetch($stmt)) {