]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Group.php
Merge pull request #10969 from MrPetovan/task/remove-private-contacts
[friendica.git] / src / Model / Group.php
index e9d62ff3e771bab7804279d1321588508705193e..8e7f807cfeb8cdc4f92c4f7d23f1f04bd584fb10 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -160,7 +160,7 @@ class Group
        public static function countUnseen()
        {
                $stmt = DBA::p("SELECT `group`.`id`, `group`.`name`,
-                               (SELECT COUNT(*) FROM `post-user-view`
+                               (SELECT COUNT(*) FROM `post-user`
                                        WHERE `uid` = ?
                                        AND `unseen`
                                        AND `contact-id` IN
@@ -251,28 +251,6 @@ class Group
                return $return;
        }
 
-       /**
-        * Mark a group as deleted based on its name
-        *
-        * @param int    $uid
-        * @param string $name
-        * @return bool
-        * @throws \Exception
-        * @deprecated Use Group::remove instead
-        *
-        */
-       public static function removeByName($uid, $name)
-       {
-               $return = false;
-               if (!empty($uid) && !empty($name)) {
-                       $gid = self::getIdByName($uid, $name);
-
-                       $return = self::remove($gid);
-               }
-
-               return $return;
-       }
-
        /**
         * Adds a contact to a group
         *
@@ -317,26 +295,6 @@ class Group
                return $return;
        }
 
-       /**
-        * Removes a contact from a group based on its name
-        *
-        * @param int    $uid
-        * @param string $name
-        * @param int    $cid
-        * @return boolean
-        * @throws \Exception
-        * @deprecated Use Group::removeMember instead
-        *
-        */
-       public static function removeMemberByName($uid, $name, $cid)
-       {
-               $gid = self::getIdByName($uid, $name);
-
-               $return = self::removeMember($gid, $cid);
-
-               return $return;
-       }
-
        /**
         * Returns the combined list of contact ids from a group id list
         *