Use "rel" for "self" instead of using a separate field
This commit is contained in:
parent
19c3e55ca8
commit
3eea4b1130
|
@ -133,6 +133,7 @@ class Contact
|
||||||
const FOLLOWER = 1;
|
const FOLLOWER = 1;
|
||||||
const SHARING = 2;
|
const SHARING = 2;
|
||||||
const FRIEND = 3;
|
const FRIEND = 3;
|
||||||
|
const SELF = 4;
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -72,6 +72,10 @@ class User
|
||||||
$fields['ignored'] = $fields['readonly'];
|
$fields['ignored'] = $fields['readonly'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($fields['self'])) {
|
||||||
|
$fields['rel'] = Contact::SELF;
|
||||||
|
}
|
||||||
|
|
||||||
$fields = DBStructure::getFieldsForTable('user-contact', $fields);
|
$fields = DBStructure::getFieldsForTable('user-contact', $fields);
|
||||||
$fields['cid'] = $pcid;
|
$fields['cid'] = $pcid;
|
||||||
$fields['uid'] = $contact['uid'];
|
$fields['uid'] = $contact['uid'];
|
||||||
|
@ -105,6 +109,10 @@ class User
|
||||||
$fields['ignored'] = $fields['readonly'];
|
$fields['ignored'] = $fields['readonly'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($fields['self'])) {
|
||||||
|
$fields['rel'] = Contact::SELF;
|
||||||
|
}
|
||||||
|
|
||||||
$update_fields = DBStructure::getFieldsForTable('user-contact', $fields);
|
$update_fields = DBStructure::getFieldsForTable('user-contact', $fields);
|
||||||
if (!empty($update_fields)) {
|
if (!empty($update_fields)) {
|
||||||
$contacts = DBA::select('contact', ['uri-id', 'uid'], $condition);
|
$contacts = DBA::select('contact', ['uri-id', 'uid'], $condition);
|
||||||
|
|
Loading…
Reference in a new issue