]> git.mxchange.org Git - friendica.git/commitdiff
Show the profile visibility only for Friendica contacts.
authorMichael Vogel <icarus@dabo.de>
Sat, 21 Feb 2015 19:03:02 +0000 (20:03 +0100)
committerMichael Vogel <icarus@dabo.de>
Sat, 21 Feb 2015 19:03:02 +0000 (20:03 +0100)
mod/contacts.php
view/templates/contact_edit.tpl

index ea16e1475c3c9894d07e93e276230cca53823124..a3263f39599bbce886c5b444f8ab036edaef6597 100644 (file)
@@ -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') ),
index 9d5063146e4fe3375a44570db22a6f1fb0f1c70e..c63166aa758dce2e62d80dba51c11b9e423f0fd2 100644 (file)
 </div>
 <div id="contact-edit-info-end"></div>
 
-
-<div id="contact-edit-profile-select-text">
-<h4>{{$lbl_vis1}}</h4>
-<p>{{$lbl_vis2}}</p> 
-</div>
-{{$profile_select}}
-<div id="contact-edit-profile-select-end"></div>
-
-<input class="contact-edit-submit" type="submit" name="submit" value="{{$submit|escape:'html'}}" />
-
+{{if $profile_select}}
+       <div id="contact-edit-profile-select-text">
+       <h4>{{$lbl_vis1}}</h4>
+       <p>{{$lbl_vis2}}</p> 
+       </div>
+       {{$profile_select}}
+       <div id="contact-edit-profile-select-end"></div>
+       <input class="contact-edit-submit" type="submit" name="submit" value="{{$submit|escape:'html'}}" />
+{{/if}}
 </form>
 </div>