]> git.mxchange.org Git - friendica.git/commitdiff
The GNU-Social import is removed
authorMichael <heluecht@pirati.ca>
Wed, 21 Dec 2022 22:21:22 +0000 (22:21 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 21 Dec 2022 22:21:22 +0000 (22:21 +0000)
src/Module/Contact/Follow.php
src/Module/Search/Acl.php
src/Module/User/PortableContacts.php
src/Protocol/DFRN.php
src/Protocol/OStatus.php

index f8b88c05fc7ab35686ede286500d988a34748736..0b4363b4c1a5b846e1de47c32d0b65e6db94f72d 100644 (file)
@@ -105,11 +105,10 @@ class Follow extends BaseModule
 
                // Don't try to add a pending contact
                $userContact = Contact::selectFirst(['pending'], [
-                       "`uid` = ? AND ((`rel` != ?) OR (`network` = ?)) AND (`nurl` = ? OR `alias` = ? OR `alias` = ?) AND `network` != ?",
+                       "`uid` = ? AND ((`rel` != ?) OR (`network` = ?)) AND (`nurl` = ? OR `alias` = ? OR `alias` = ?)",
                        $uid, Contact::FOLLOWER, Protocol::DFRN,
                        Strings::normaliseLink($url),
-                       Strings::normaliseLink($url), $url,
-                       Protocol::STATUSNET]);
+                       Strings::normaliseLink($url), $url]);
 
                if (!empty($userContact['pending'])) {
                        $this->sysMessages->addNotice($this->t('You already added this contact.'));
index ddf45303b32eb716fdb55a7eefa752191a0d7239..9f072b91c938df938c70ceb6047b1cda5fcea908 100644 (file)
@@ -135,13 +135,13 @@ class Acl extends BaseModule
                switch ($type) {
                        case self::TYPE_MENTION_CONTACT_GROUP:
                                $condition = DBA::mergeConditions($condition,
-                                       ["NOT `self` AND NOT `blocked` AND `notify` != ? AND NOT `network` IN (?, ?)", '', Protocol::OSTATUS, Protocol::STATUSNET
+                                       ["NOT `self` AND NOT `blocked` AND `notify` != ? AND `network` != ?", '', Protocol::OSTATUS
                                ]);
                                break;
 
                        case self::TYPE_MENTION_CONTACT:
                                $condition = DBA::mergeConditions($condition,
-                                       ["NOT `self` AND NOT `blocked` AND `notify` != ? AND `network` != ?", '', Protocol::STATUSNET
+                                       ["NOT `self` AND NOT `blocked` AND `notify` != ?", ''
                                ]);
                                break;
 
index 6a3c1201d972437bdd624487eb0ed8d624a60fae..9f98ca7ebe0849fb1e97042cb0456a82a42fcf29 100644 (file)
@@ -223,10 +223,6 @@ class PortableContacts extends BaseModule
 
                        if ($selectedFields['network']) {
                                $entry['network'] = $contact['network'];
-                               if ($entry['network'] == Protocol::STATUSNET) {
-                                       $entry['network'] = Protocol::OSTATUS;
-                               }
-
                                if (($entry['network'] == '') && ($contact['self'])) {
                                        $entry['network'] = Protocol::DFRN;
                                }
index 9900708ed0d29d9a5a3766bdf0c054d265e45641..e29cfcc5ab38c7cd29989179c53da31cc0e0489e 100644 (file)
@@ -1066,8 +1066,8 @@ class DFRN
 
                $fields = ['id', 'uid', 'url', 'network', 'avatar-date', 'avatar', 'name-date', 'uri-date', 'addr',
                        'name', 'nick', 'about', 'location', 'keywords', 'xmpp', 'bdyear', 'bd', 'hidden', 'contact-type'];
-               $condition = ["`uid` = ? AND `nurl` = ? AND `network` != ? AND NOT `pending` AND NOT `blocked`",
-                       $importer["importer_uid"], Strings::normaliseLink($author["link"]), Protocol::STATUSNET];
+               $condition = ["`uid` = ? AND `nurl` = ? AND NOT `pending` AND NOT `blocked`",
+                       $importer["importer_uid"], Strings::normaliseLink($author["link"])];
 
                if ($importer['account-type'] != User::ACCOUNT_TYPE_COMMUNITY) {
                        $condition = DBA::mergeConditions($condition, ['rel' => [Contact::SHARING, Contact::FRIEND]]);
index ee9c015a9c44260aa92bbb7c5f8237615b4272f2..81a0c38842edcc77ad8d298486e254da4f091f45 100644 (file)
@@ -103,9 +103,9 @@ class OStatus
 */
                if ($aliaslink != '') {
                        $contact = DBA::selectFirst('contact', [], [
-                               "`uid` = ? AND `alias` = ? AND `network` != ? AND `rel` IN (?, ?)",
+                               "`uid` = ? AND `alias` = ? AND `rel` IN (?, ?)",
                                $importer['uid'],
-                               $aliaslink, Protocol::STATUSNET,
+                               $aliaslink,
                                Contact::SHARING, Contact::FRIEND,
                        ]);
                }
@@ -116,11 +116,10 @@ class OStatus
                        }
 
                        $contact = DBA::selectFirst('contact', [], [
-                               "`uid` = ? AND `nurl` IN (?, ?) AND `network` != ? AND `rel` IN (?, ?)",
+                               "`uid` = ? AND `nurl` IN (?, ?) AND `rel` IN (?, ?)",
                                $importer['uid'],
                                Strings::normaliseLink($author['author-link']),
                                Strings::normaliseLink($aliaslink),
-                               Protocol::STATUSNET,
                                Contact::SHARING,
                                Contact::FRIEND,
                        ]);
@@ -128,10 +127,9 @@ class OStatus
 
                if (!DBA::isResult($contact) && ($addr != '')) {
                        $contact = DBA::selectFirst('contact', [], [
-                               "`uid` = ? AND `addr` = ? AND `network` != ? AND `rel` IN (?, ?)",
+                               "`uid` = ? AND `addr` = ? AND `rel` IN (?, ?)",
                                $importer['uid'],
                                $addr,
-                               Protocol::STATUSNET,
                                Contact::SHARING,
                                Contact::FRIEND,
                        ]);