Remove references to pear/Text_Highlighter
[friendica.git/.git] / mod / common.php
index 5c2cf00..afe78ce 100644 (file)
@@ -10,6 +10,7 @@ use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Model\GContact;
 use Friendica\Model\Profile;
+use Friendica\Util\Proxy as ProxyUtils;
 
 require_once 'include/dba.php';
 require_once 'mod/contacts.php';
@@ -37,14 +38,14 @@ function common_content(App $a)
        }
 
        if ($cmd === 'loc' && $cid) {
-               $contact = DBA::selectFirst('contact', ['name', 'url', 'photo'], ['id' => $cid, 'uid' => $uid]);
+               $contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['id' => $cid, 'uid' => $uid]);
 
                if (DBA::isResult($contact)) {
                        $a->page['aside'] = "";
                        Profile::load($a, "", 0, Contact::getDetailsByURL($contact["url"]));
                }
        } else {
-               $contact = DBA::selectFirst('contact', ['name', 'url', 'photo'], ['self' => true, 'uid' => $uid]);
+               $contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]);
 
                if (DBA::isResult($contact)) {
                        $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), [
@@ -120,7 +121,7 @@ function common_content(App $a)
                        'url'          => $rr['url'],
                        'itemurl'      => defaults($contact_details, 'addr', $rr['url']),
                        'name'         => $contact_details['name'],
-                       'thumb'        => proxy_url($contact_details['thumb'], false, PROXY_SIZE_THUMB),
+                       'thumb'        => ProxyUtils::proxifyUrl($contact_details['thumb'], false, ProxyUtils::SIZE_THUMB),
                        'img_hover'    => htmlentities($contact_details['name']),
                        'details'      => $contact_details['location'],
                        'tags'         => $contact_details['keywords'],
@@ -136,7 +137,7 @@ function common_content(App $a)
        $title = '';
        $tab_str = '';
        if ($cmd === 'loc' && $cid && local_user() == $uid) {
-               $tab_str = contacts_tab($a, $cid, 4);
+               $tab_str = contacts_tab($a, $contact, 4);
        } else {
                $title = L10n::t('Common Friends');
        }