mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:50:11 +00:00
Merge pull request #6446 from annando/approve
Now storing the "manually approve" data / fix update routine
This commit is contained in:
commit
990bbea19d
4 changed files with 15 additions and 9 deletions
|
@ -1239,7 +1239,7 @@ class DBA
|
|||
|
||||
foreach ($old_fields AS $fieldname => $content) {
|
||||
if (isset($fields[$fieldname])) {
|
||||
if ($fields[$fieldname] == $content) {
|
||||
if (($fields[$fieldname] == $content) && !is_null($content)) {
|
||||
unset($fields[$fieldname]);
|
||||
} else {
|
||||
$do_update = true;
|
||||
|
|
|
@ -157,7 +157,7 @@ class APContact extends BaseObject
|
|||
|
||||
$apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted, 'w3id:publicKey', 'w3id:publicKeyPem'));
|
||||
|
||||
$manually_approve = JsonLD::fetchElement($compacted, 'as:manuallyApprovesFollowers');
|
||||
$apcontact['manually-approve'] = (int)JsonLD::fetchElement($compacted, 'as:manuallyApprovesFollowers');
|
||||
|
||||
// To-Do
|
||||
|
||||
|
@ -204,8 +204,8 @@ class APContact extends BaseObject
|
|||
$contact_fields['prv'] = false;
|
||||
} else {
|
||||
// Otherwise set the corresponding forum type
|
||||
$contact_fields['forum'] = !$manually_approve;
|
||||
$contact_fields['prv'] = $manually_approve;
|
||||
$contact_fields['forum'] = !$apcontact['manually-approve'];
|
||||
$contact_fields['prv'] = $apcontact['manually-approve'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue