From f3cc065e66c8522b64a87cc84d3baf7b51eb9a9b Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 21 Feb 2015 20:03:02 +0100 Subject: [PATCH] Show the profile visibility only for Friendica contacts. --- mod/contacts.php | 5 ++++- view/templates/contact_edit.tpl | 19 +++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index ea16e1475..a3263f395 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -482,6 +482,9 @@ function contacts_content(&$a) { if (in_array($contact['network'], array(NETWORK_FEED, NETWORK_MAIL, NETWORK_MAIL2))) $poll_interval = contact_poll_interval($contact['priority'],(! $poll_enabled)); + if ($contact['network'] == NETWORK_DFRN) + $profile_select = contact_profile_assign($contact['profile-id'],(($contact['network'] !== NETWORK_DFRN) ? true : false)); + $o .= replace_macros($tpl, array( '$header' => t('Contact Editor'), '$tab_str' => $tab_str, @@ -509,7 +512,7 @@ function contacts_content(&$a) { '$updpub' => t('Update public posts'), '$last_update' => $last_update, '$udnow' => t('Update now'), - '$profile_select' => contact_profile_assign($contact['profile-id'],(($contact['network'] !== NETWORK_DFRN) ? true : false)), + '$profile_select' => $profile_select, '$contact_id' => $contact['id'], '$block_text' => (($contact['blocked']) ? t('Unblock') : t('Block') ), '$ignore_text' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ), diff --git a/view/templates/contact_edit.tpl b/view/templates/contact_edit.tpl index 9d5063146..c63166aa7 100644 --- a/view/templates/contact_edit.tpl +++ b/view/templates/contact_edit.tpl @@ -84,15 +84,14 @@
- -
-

{{$lbl_vis1}}

-

{{$lbl_vis2}}

-
-{{$profile_select}} -
- - - +{{if $profile_select}} +
+

{{$lbl_vis1}}

+

{{$lbl_vis2}}

+
+ {{$profile_select}} +
+ +{{/if}}