mirror of
https://github.com/friendica/friendica
synced 2025-04-19 05:50:10 +00:00
Merge remote-tracking branch 'upstream/develop' into contact-media
This commit is contained in:
commit
2408ac8227
19 changed files with 738 additions and 462 deletions
|
@ -437,15 +437,17 @@ class Contact extends BaseModule
|
|||
DI::page()['aside'] = '';
|
||||
|
||||
return Renderer::replaceMacros(Renderer::getMarkupTemplate('contact_drop_confirm.tpl'), [
|
||||
'$header' => DI::l10n()->t('Drop contact'),
|
||||
'$l10n' => [
|
||||
'header' => DI::l10n()->t('Drop contact'),
|
||||
'message' => DI::l10n()->t('Do you really want to delete this contact?'),
|
||||
'confirm' => DI::l10n()->t('Yes'),
|
||||
'cancel' => DI::l10n()->t('Cancel'),
|
||||
],
|
||||
'$contact' => self::getContactTemplateVars($orig_record),
|
||||
'$method' => 'get',
|
||||
'$message' => DI::l10n()->t('Do you really want to delete this contact?'),
|
||||
'$confirm' => DI::l10n()->t('Yes'),
|
||||
'$confirm_url' => DI::args()->getCommand(),
|
||||
'$confirm_name' => 't',
|
||||
'$confirm_value' => BaseModule::getFormSecurityToken('contact_action'),
|
||||
'$cancel' => DI::l10n()->t('Cancel'),
|
||||
]);
|
||||
}
|
||||
// Now check how the user responded to the confirmation query
|
||||
|
@ -1159,6 +1161,16 @@ class Contact extends BaseModule
|
|||
];
|
||||
|
||||
if ($contact['uid'] != 0) {
|
||||
if (Protocol::supportsRevokeFollow($contact['network']) && in_array($contact['rel'], [Model\Contact::FOLLOWER, Model\Contact::FRIEND])) {
|
||||
$contact_actions['revoke_follow'] = [
|
||||
'label' => DI::l10n()->t('Revoke Follow'),
|
||||
'url' => 'contact/' . $contact['id'] . '/revoke',
|
||||
'title' => DI::l10n()->t('Revoke the follow from this contact'),
|
||||
'sel' => '',
|
||||
'id' => 'revoke_follow',
|
||||
];
|
||||
}
|
||||
|
||||
$contact_actions['delete'] = [
|
||||
'label' => DI::l10n()->t('Delete'),
|
||||
'url' => 'contact/' . $contact['id'] . '/drop?t=' . $formSecurityToken,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue