]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
Merge pull request #5836 from annando/ap4
[friendica.git] / mod / contacts.php
index 8342906952458c609e667915458132987d5da60f..c33e9b620607ded477f2c6418bf8e827b6548494 100644 (file)
@@ -471,7 +471,7 @@ function contacts_content(App $a, $update = 0)
 
                        _contact_drop($orig_record);
                        info(L10n::t('Contact has been removed.') . EOL);
-                       
+
                        goaway('contacts');
                        return; // NOTREACHED
                }
@@ -544,7 +544,7 @@ function contacts_content(App $a, $update = 0)
                }
                $lblsuggest = (($contact['network'] === Protocol::DFRN) ? L10n::t('Suggest friends') : '');
 
-               $poll_enabled = in_array($contact['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::OSTATUS, Protocol::FEED, Protocol::MAIL]);
+               $poll_enabled = in_array($contact['network'], [Protocol::DFRN, Protocol::OSTATUS, Protocol::FEED, Protocol::MAIL]);
 
                $nettype = L10n::t('Network type: %s', ContactSelector::networkToName($contact['network'], $contact["url"]));
 
@@ -635,15 +635,15 @@ function contacts_content(App $a, $update = 0)
                        '$follow_text' => $follow_text,
                        '$profile_select' => $profile_select,
                        '$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' => (($contact['network'] !== Protocol::DFRN && $contact['network'] !== Protocol::MAIL && $contact['network'] !== Protocol::DIASPORA) ? $insecure : ''),
+                       '$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') : ''),
+                       '$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,
@@ -1085,7 +1085,7 @@ function contact_actions($contact)
        }
 
        $contact_actions['block'] = [
-               'label' => (intval($contact['blocked']) ? L10n::t('Unblock') : L10n::t('Block') ),
+               'label' => (intval($contact['blocked']) ? L10n::t('Unblock') : L10n::t('Block')),
                'url'   => 'contacts/' . $contact['id'] . '/block',
                'title' => L10n::t('Toggle Blocked status'),
                'sel'   => (intval($contact['blocked']) ? 'active' : ''),
@@ -1093,7 +1093,7 @@ function contact_actions($contact)
        ];
 
        $contact_actions['ignore'] = [
-               'label' => (intval($contact['readonly']) ? L10n::t('Unignore') : L10n::t('Ignore') ),
+               'label' => (intval($contact['readonly']) ? L10n::t('Unignore') : L10n::t('Ignore')),
                'url'   => 'contacts/' . $contact['id'] . '/ignore',
                'title' => L10n::t('Toggle Ignored status'),
                'sel'   => (intval($contact['readonly']) ? 'active' : ''),
@@ -1102,7 +1102,7 @@ function contact_actions($contact)
 
        if ($contact['uid'] != 0) {
                $contact_actions['archive'] = [
-                       'label' => (intval($contact['archive']) ? L10n::t('Unarchive') : L10n::t('Archive') ),
+                       'label' => (intval($contact['archive']) ? L10n::t('Unarchive') : L10n::t('Archive')),
                        'url'   => 'contacts/' . $contact['id'] . '/archive',
                        'title' => L10n::t('Toggle Archive status'),
                        'sel'   => (intval($contact['archive']) ? 'active' : ''),