]> git.mxchange.org Git - friendica.git/commitdiff
Use "rel" for "self" instead of using a separate field
authorMichael <heluecht@pirati.ca>
Sun, 12 Sep 2021 19:04:27 +0000 (19:04 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 12 Sep 2021 19:04:27 +0000 (19:04 +0000)
src/Model/Contact.php
src/Model/Contact/User.php

index 1eb133986107d4ae552e456a43d785b25188721a..e7a6b529d3d562b90d4b67f014a160310067f346 100644 (file)
@@ -133,6 +133,7 @@ class Contact
        const FOLLOWER = 1;
        const SHARING  = 2;
        const FRIEND   = 3;
+       const SELF     = 4;
        /**
         * @}
         */
index 52904925f80adc9ffea7997ca3a79e0336521ce9..85399951c87e878e2c65b19e0421ec0780354e68 100644 (file)
@@ -72,6 +72,10 @@ class User
                        $fields['ignored'] = $fields['readonly'];
                }
 
+               if (!empty($fields['self'])) {
+                       $fields['rel'] = Contact::SELF;
+               }
+
                $fields = DBStructure::getFieldsForTable('user-contact', $fields);
                $fields['cid'] = $pcid;
                $fields['uid'] = $contact['uid'];
@@ -105,6 +109,10 @@ class User
                        $fields['ignored'] = $fields['readonly'];
                }
 
+               if (!empty($fields['self'])) {
+                       $fields['rel'] = Contact::SELF;
+               }
+
                $update_fields = DBStructure::getFieldsForTable('user-contact', $fields);
                if (!empty($update_fields)) {
                        $contacts = DBA::select('contact', ['uri-id', 'uid'], $condition);