]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
Merge pull request #4554 from annando/avoid-deflate
[friendica.git] / mod / contacts.php
index 81f1a6cafdef6ea8b95b8a535a2fe1451eb68f17..09090e541a502e5254c726f2ca070421051d1b72 100644 (file)
@@ -6,6 +6,7 @@
 use Friendica\App;
 use Friendica\Content\ContactSelector;
 use Friendica\Content\Nav;
+use Friendica\Content\Text\BBCode;
 use Friendica\Content\Widget;
 use Friendica\Core\Addon;
 use Friendica\Core\L10n;
@@ -17,7 +18,7 @@ use Friendica\Model\GContact;
 use Friendica\Model\Group;
 use Friendica\Model\Profile;
 use Friendica\Network\Probe;
-use Friendica\Util\Temporal;
+use Friendica\Util\DateTimeFormat;
 
 require_once 'mod/proxy.php';
 
@@ -348,9 +349,6 @@ function _contact_archive($contact_id, $orig_record)
                intval($contact_id),
                intval(local_user())
        );
-       if ($archived) {
-               q("UPDATE `item` SET `private` = 2 WHERE `contact-id` = %d AND `uid` = %d", intval($contact_id), intval(local_user()));
-       }
        return DBM::is_result($r);
 }
 
@@ -540,7 +538,7 @@ function contacts_content(App $a)
 
                $insecure = L10n::t('Private communications are not available for this contact.');
 
-               $last_update = (($contact['last-update'] <= NULL_DATE) ? L10n::t('Never') : Temporal::local($contact['last-update'], 'D, j M Y, g:i A'));
+               $last_update = (($contact['last-update'] <= NULL_DATE) ? L10n::t('Never') : DateTimeFormat::local($contact['last-update'], 'D, j M Y, g:i A'));
 
                if ($contact['last-update'] > NULL_DATE) {
                        $last_update .= ' ' . (($contact['last-update'] <= $contact['success_update']) ? L10n::t("\x28Update was successful\x29") : L10n::t("\x28Update was not successful\x29"));
@@ -554,7 +552,7 @@ function contacts_content(App $a)
                // tabs
                $tab_str = contacts_tab($a, $contact_id, 2);
 
-               $lost_contact = (($contact['archive'] && $contact['term-date'] > NULL_DATE && $contact['term-date'] < Temporal::utcNow()) ? L10n::t('Communications lost with this contact!') : '');
+               $lost_contact = (($contact['archive'] && $contact['term-date'] > NULL_DATE && $contact['term-date'] < DateTimeFormat::utcNow()) ? L10n::t('Communications lost with this contact!') : '');
 
                $fetch_further_information = null;
                if ($contact['network'] == NETWORK_FEED) {
@@ -649,11 +647,11 @@ function contacts_content(App $a)
                        '$profileurllabel' => L10n::t('Profile URL'),
                        '$profileurl' => $contact['url'],
                        '$account_type' => Contact::getAccountType($contact),
-                       '$location' => bbcode($contact["location"]),
+                       '$location' => BBCode::convert($contact["location"]),
                        '$location_label' => L10n::t("Location:"),
-                       '$xmpp' => bbcode($contact["xmpp"]),
+                       '$xmpp' => BBCode::convert($contact["xmpp"]),
                        '$xmpp_label' => L10n::t("XMPP:"),
-                       '$about' => bbcode($contact["about"], false, false),
+                       '$about' => BBCode::convert($contact["about"], false),
                        '$about_label' => L10n::t("About:"),
                        '$keywords' => $contact["keywords"],
                        '$keywords_label' => L10n::t("Tags:"),