]> git.mxchange.org Git - friendica.git/blobdiff - mod/common.php
Ops, one more left ...
[friendica.git] / mod / common.php
index c2095eefd56bf624bb38982e5e4259894636e7ee..5955b514362ed962f69932cdb98a636e96844703 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';
@@ -39,14 +40,14 @@ function common_content(App $a)
        if ($cmd === 'loc' && $cid) {
                $contact = DBA::selectFirst('contact', ['name', 'url', 'photo'], ['id' => $cid, 'uid' => $uid]);
 
-               if (DBA::is_result($contact)) {
+               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]);
 
-               if (DBA::is_result($contact)) {
+               if (DBA::isResult($contact)) {
                        $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), [
                                '$name' => htmlentities($contact['name']),
                                '$photo' => $contact['photo'],
@@ -60,17 +61,17 @@ function common_content(App $a)
                }
        }
 
-       if (!DBA::is_result($contact)) {
+       if (!DBA::isResult($contact)) {
                return;
        }
 
        if (!$cid && Profile::getMyURL()) {
                $contact = DBA::selectFirst('contact', ['id'], ['nurl' => normalise_link(Profile::getMyURL()), 'uid' => $uid]);
-               if (DBA::is_result($contact)) {
+               if (DBA::isResult($contact)) {
                        $cid = $contact['id'];
                } else {
                        $gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => normalise_link(Profile::getMyURL())]);
-                       if (DBA::is_result($gcontact)) {
+                       if (DBA::isResult($gcontact)) {
                                $zcid = $gcontact['id'];
                        }
                }
@@ -99,7 +100,7 @@ function common_content(App $a)
                $r = GContact::commonFriendsZcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
        }
 
-       if (!DBA::is_result($r)) {
+       if (!DBA::isResult($r)) {
                return $o;
        }
 
@@ -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'],