- $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), [
- '$name' => htmlentities($a->data['contact']['name']),
- '$photo' => $a->data['contact']['photo'],
- '$url' => Model\Contact::MagicLink($a->data['contact']['url']),
- '$addr' => (($a->data['contact']['addr'] != "") ? ($a->data['contact']['addr']) : ""),
+ $vcard_widget = replace_macros(get_markup_template('vcard-widget.tpl'), [
+ '$name' => htmlentities($contact['name']),
+ '$photo' => $contact['photo'],
+ '$url' => Model\Contact::MagicLink($contact['url']),
+ '$addr' => defaults($contact, 'addr', ''),
- $r = DBA::update('contact',
- ['profile-id' => $profile_id,
- 'priority' => $priority,
- 'info' => $info,
- 'hidden' => $hidden,
- 'notify_new_posts' => $notify,
- 'fetch_further_information' => $fetch_further_information,
- 'ffi_keyword_blacklist' => $ffi_keyword_blacklist],
- ['id' => $contact_id, 'uid' => local_user()]);
+ $r = DBA::update('contact', [
+ 'profile-id' => $profile_id,
+ 'priority' => $priority,
+ 'info' => $info,
+ 'hidden' => $hidden,
+ 'notify_new_posts' => $notify,
+ 'fetch_further_information' => $fetch_further_information,
+ 'ffi_keyword_blacklist' => $ffi_keyword_blacklist],
+ ['id' => $contact_id, 'uid' => local_user()]
+ );
- $updatefields = ["name", "nick", "url", "addr", "batch", "notify", "poll", "request", "confirm",
- "poco", "network", "alias"];
- $update = [];
+ $updatefields = ['name', 'nick', 'url', 'addr', 'batch', 'notify', 'poll', 'request', 'confirm', 'poco', 'network', 'alias'];
+ $fields = [];
- '$header' => L10n::t("Contact"),
- '$tab_str' => $tab_str,
- '$submit' => L10n::t('Submit'),
- '$lbl_vis1' => $lbl_vis1,
- '$lbl_vis2' => L10n::t('Please choose the profile you would like to display to %s when viewing your profile securely.', $contact['name']),
- '$lbl_info1' => $lbl_info1,
- '$lbl_info2' => L10n::t('Their personal note'),
- '$reason' => trim(notags($contact['reason'])),
- '$infedit' => L10n::t('Edit contact notes'),
- '$common_link' => 'common/loc/' . local_user() . '/' . $contact['id'],
- '$relation_text' => $relation_text,
- '$visit' => L10n::t('Visit %s\'s profile [%s]', $contact['name'], $contact['url']),
- '$blockunblock' => L10n::t('Block/Unblock contact'),
- '$ignorecont' => L10n::t('Ignore contact'),
- '$lblcrepair' => L10n::t("Repair URL settings"),
- '$lblrecent' => L10n::t('View conversations'),
- '$lblsuggest' => $lblsuggest,
- '$nettype' => $nettype,
- '$poll_interval' => $poll_interval,
- '$poll_enabled' => $poll_enabled,
- '$lastupdtext' => L10n::t('Last update:'),
- '$lost_contact' => $lost_contact,
- '$updpub' => L10n::t('Update public posts'),
- '$last_update' => $last_update,
- '$udnow' => L10n::t('Update now'),
- '$follow' => $follow,
- '$follow_text' => $follow_text,
+ '$header' => L10n::t('Contact'),
+ '$tab_str' => $tab_str,
+ '$submit' => L10n::t('Submit'),
+ '$lbl_vis1' => $lbl_vis1,
+ '$lbl_vis2' => L10n::t('Please choose the profile you would like to display to %s when viewing your profile securely.', $contact['name']),
+ '$lbl_info1' => $lbl_info1,
+ '$lbl_info2' => L10n::t('Their personal note'),
+ '$reason' => trim(notags($contact['reason'])),
+ '$infedit' => L10n::t('Edit contact notes'),
+ '$common_link' => 'common/loc/' . local_user() . '/' . $contact['id'],
+ '$relation_text' => $relation_text,
+ '$visit' => L10n::t('Visit %s\'s profile [%s]', $contact['name'], $contact['url']),
+ '$blockunblock' => L10n::t('Block/Unblock contact'),
+ '$ignorecont' => L10n::t('Ignore contact'),
+ '$lblcrepair' => L10n::t('Repair URL settings'),
+ '$lblrecent' => L10n::t('View conversations'),
+ '$lblsuggest' => $lblsuggest,
+ '$nettype' => $nettype,
+ '$poll_interval' => $poll_interval,
+ '$poll_enabled' => $poll_enabled,
+ '$lastupdtext' => L10n::t('Last update:'),
+ '$lost_contact' => $lost_contact,
+ '$updpub' => L10n::t('Update public posts'),
+ '$last_update' => $last_update,
+ '$udnow' => L10n::t('Update now'),
+ '$follow' => $follow,
+ '$follow_text' => $follow_text,
- '$contact_id' => $contact['id'],
- '$block_text' => ($contact['blocked'] ? L10n::t('Unblock') : L10n::t('Block')),
- '$ignore_text' => ($contact['readonly'] ? L10n::t('Unignore') : L10n::t('Ignore')),
- '$insecure' => (in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::MAIL, Protocol::DIASPORA]) ? '' : $insecure),
- '$info' => $contact['info'],
- '$cinfo' => ['info', '', $contact['info'], ''],
- '$blocked' => ($contact['blocked'] ? L10n::t('Currently blocked') : ''),
- '$ignored' => ($contact['readonly'] ? L10n::t('Currently ignored') : ''),
- '$archived' => ($contact['archive'] ? L10n::t('Currently archived') : ''),
- '$pending' => ($contact['pending'] ? L10n::t('Awaiting connection acknowledge') : ''),
- '$hidden' => ['hidden', L10n::t('Hide this contact from others'), ($contact['hidden'] == 1), L10n::t('Replies/likes to your public posts <strong>may</strong> still be visible')],
- '$notify' => ['notify', L10n::t('Notification for new posts'), ($contact['notify_new_posts'] == 1), L10n::t('Send a notification of every new post of this contact')],
+ '$contact_id' => $contact['id'],
+ '$block_text' => ($contact['blocked'] ? L10n::t('Unblock') : L10n::t('Block')),
+ '$ignore_text' => ($contact['readonly'] ? L10n::t('Unignore') : L10n::t('Ignore')),
+ '$insecure' => (in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::MAIL, Protocol::DIASPORA]) ? '' : $insecure),
+ '$info' => $contact['info'],
+ '$cinfo' => ['info', '', $contact['info'], ''],
+ '$blocked' => ($contact['blocked'] ? L10n::t('Currently blocked') : ''),
+ '$ignored' => ($contact['readonly'] ? L10n::t('Currently ignored') : ''),
+ '$archived' => ($contact['archive'] ? L10n::t('Currently archived') : ''),
+ '$pending' => ($contact['pending'] ? L10n::t('Awaiting connection acknowledge') : ''),
+ '$hidden' => ['hidden', L10n::t('Hide this contact from others'), ($contact['hidden'] == 1), L10n::t('Replies/likes to your public posts <strong>may</strong> still be visible')],
+ '$notify' => ['notify', L10n::t('Notification for new posts'), ($contact['notify_new_posts'] == 1), L10n::t('Send a notification of every new post of this contact')],
'$fetch_further_information' => $fetch_further_information,
'$ffi_keyword_blacklist' => $contact['ffi_keyword_blacklist'],
'$ffi_keyword_blacklist' => ['ffi_keyword_blacklist', L10n::t('Blacklisted keywords'), $contact['ffi_keyword_blacklist'], L10n::t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
'$fetch_further_information' => $fetch_further_information,
'$ffi_keyword_blacklist' => $contact['ffi_keyword_blacklist'],
'$ffi_keyword_blacklist' => ['ffi_keyword_blacklist', L10n::t('Blacklisted keywords'), $contact['ffi_keyword_blacklist'], L10n::t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
- '$photo' => $contact['photo'],
- '$name' => htmlentities($contact['name']),
- '$dir_icon' => $dir_icon,
- '$sparkle' => $sparkle,
- '$url' => $url,
- '$profileurllabel' => L10n::t('Profile URL'),
- '$profileurl' => $contact['url'],
- '$account_type' => Model\Contact::getAccountType($contact),
- '$location' => BBCode::convert($contact["location"]),
- '$location_label' => L10n::t("Location:"),
- '$xmpp' => BBCode::convert($contact["xmpp"]),
- '$xmpp_label' => L10n::t("XMPP:"),
- '$about' => BBCode::convert($contact["about"], false),
- '$about_label' => L10n::t("About:"),
- '$keywords' => $contact["keywords"],
- '$keywords_label' => L10n::t("Tags:"),
- '$contact_action_button' => L10n::t("Actions"),
- '$contact_actions' => $contact_actions,
- '$contact_status' => L10n::t("Status"),
+ '$photo' => $contact['photo'],
+ '$name' => htmlentities($contact['name']),
+ '$dir_icon' => $dir_icon,
+ '$sparkle' => $sparkle,
+ '$url' => $url,
+ '$profileurllabel'=> L10n::t('Profile URL'),
+ '$profileurl' => $contact['url'],
+ '$account_type' => Model\Contact::getAccountType($contact),
+ '$location' => BBCode::convert($contact['location']),
+ '$location_label' => L10n::t('Location:'),
+ '$xmpp' => BBCode::convert($contact['xmpp']),
+ '$xmpp_label' => L10n::t('XMPP:'),
+ '$about' => BBCode::convert($contact['about'], false),
+ '$about_label' => L10n::t('About:'),
+ '$keywords' => $contact['keywords'],
+ '$keywords_label' => L10n::t('Tags:'),
+ '$contact_action_button' => L10n::t('Actions'),
+ '$contact_actions'=> $contact_actions,
+ '$contact_status' => L10n::t('Status'),
- '$baseurl' => System::baseUrl(),
- '$header' => L10n::t('Contacts') . (($nets) ? ' - ' . ContactSelector::networkToName($nets) : ''),
- '$tabs' => $t,
- '$total' => $total,
- '$search' => $search_hdr,
- '$desc' => L10n::t('Search your contacts'),
- '$finding' => $searching ? L10n::t('Results for: %s', $search) : "",
- '$submit' => L10n::t('Find'),
- '$cmd' => $a->cmd,
- '$contacts' => $contacts,
+ '$baseurl' => System::baseUrl(),
+ '$header' => L10n::t('Contacts') . (($nets) ? ' - ' . ContactSelector::networkToName($nets) : ''),
+ '$tabs' => $t,
+ '$total' => $total,
+ '$search' => $search_hdr,
+ '$desc' => L10n::t('Search your contacts'),
+ '$finding' => $searching ? L10n::t('Results for: %s', $search) : '',
+ '$submit' => L10n::t('Find'),
+ '$cmd' => $a->cmd,
+ '$contacts' => $contacts,
- 'contacts_batch_block' => L10n::t('Block') . "/" . L10n::t("Unblock"),
- "contacts_batch_ignore" => L10n::t('Ignore') . "/" . L10n::t("Unignore"),
- "contacts_batch_archive" => L10n::t('Archive') . "/" . L10n::t("Unarchive"),
- "contacts_batch_drop" => L10n::t('Delete'),
+ 'contacts_batch_block' => L10n::t('Block') . '/' . L10n::t('Unblock'),
+ 'contacts_batch_ignore' => L10n::t('Ignore') . '/' . L10n::t('Unignore'),
+ 'contacts_batch_archive' => L10n::t('Archive') . '/' . L10n::t('Unarchive'),
+ 'contacts_batch_drop' => L10n::t('Delete'),
- 'edit_hover' => L10n::t('Edit contact'),
- 'photo_menu' => Model\Contact::photoMenu($rr),
- 'id' => $rr['id'],
- 'alt_text' => $alt_text,
- 'dir_icon' => $dir_icon,
- 'thumb' => ProxyUtils::proxifyUrl($rr['thumb'], false, ProxyUtils::SIZE_THUMB),
- 'name' => htmlentities($rr['name']),
- 'username' => htmlentities($rr['name']),
+ 'edit_hover'=> L10n::t('Edit contact'),
+ 'photo_menu'=> Model\Contact::photoMenu($rr),
+ 'id' => $rr['id'],
+ 'alt_text' => $alt_text,
+ 'dir_icon' => $dir_icon,
+ 'thumb' => ProxyUtils::proxifyUrl($rr['thumb'], false, ProxyUtils::SIZE_THUMB),
+ 'name' => htmlentities($rr['name']),
+ 'username' => htmlentities($rr['name']),