Merge remote-tracking branch 'upstream/2021.09-rc' into user-contact

This commit is contained in:
Michael 2021-09-18 20:27:24 +00:00
commit 3dddea96fa
30 changed files with 414 additions and 301 deletions

View file

@ -290,11 +290,17 @@ class Contact extends BaseModule
$contact_id = $data['user'];
}
$contact = DBA::selectFirst('contact', [], ['id' => $contact_id, 'uid' => [0, local_user()], 'deleted' => false]);
if (!empty($data)) {
$contact = DBA::selectFirst('contact', [], [
'id' => $contact_id,
'uid' => [0, local_user()],
'deleted' => false
]);
// Don't display contacts that are about to be deleted
if ($contact['network'] == Protocol::PHANTOM) {
$contact = false;
// Don't display contacts that are about to be deleted
if (DBA::isResult($contact) && !empty($contact['network']) && $contact['network'] == Protocol::PHANTOM) {
$contact = false;
}
}
}
@ -432,7 +438,8 @@ class Contact extends BaseModule
'$message' => DI::l10n()->t('Do you really want to delete this contact?'),
'$confirm' => DI::l10n()->t('Yes'),
'$confirm_url' => DI::args()->getCommand(),
'$confirm_name' => 'confirmed',
'$confirm_name' => 't',
'$confirm_value' => BaseModule::getFormSecurityToken('contact_action'),
'$cancel' => DI::l10n()->t('Cancel'),
]);
}