From: Michael Date: Sun, 12 Sep 2021 19:04:27 +0000 (+0000) Subject: Use "rel" for "self" instead of using a separate field X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3eea4b11304278f1b6eb1292102d2c9ab7fcb311;p=friendica.git Use "rel" for "self" instead of using a separate field --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 1eb1339861..e7a6b529d3 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -133,6 +133,7 @@ class Contact const FOLLOWER = 1; const SHARING = 2; const FRIEND = 3; + const SELF = 4; /** * @} */ diff --git a/src/Model/Contact/User.php b/src/Model/Contact/User.php index 52904925f8..85399951c8 100644 --- a/src/Model/Contact/User.php +++ b/src/Model/Contact/User.php @@ -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);