]> git.mxchange.org Git - friendica.git/blobdiff - mod/allfriends.php
Adjusted implementation to a better one (thanks to Michael Vogel)
[friendica.git] / mod / allfriends.php
index d85d3ec9b36938f015e3f197c154ed086d98c6f7..32cd23ec6bf0d1469f2dbb43467111a61b2490ea 100644 (file)
@@ -2,14 +2,16 @@
 /**
  * @file mod/allfriends.php
  */
+
 use Friendica\App;
 use Friendica\Content\ContactSelector;
 use Friendica\Core\L10n;
 use Friendica\Core\System;
-use Friendica\Database\DBM;
+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';
@@ -33,9 +35,9 @@ function allfriends_content(App $a)
 
        $uid = $a->user['uid'];
 
-       $contact = dba::selectFirst('contact', ['name', 'url', 'photo'], ['id' => $cid, 'uid' => local_user()]);
+       $contact = DBA::selectFirst('contact', ['name', 'url', 'photo'], ['id' => $cid, 'uid' => local_user()]);
 
-       if (!DBM::is_result($contact)) {
+       if (!DBA::isResult($contact)) {
                return;
        }
 
@@ -47,7 +49,7 @@ function allfriends_content(App $a)
        $a->set_pager_total($total);
 
        $r = GContact::allFriends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']);
-       if (!DBM::is_result($r)) {
+       if (!DBA::isResult($r)) {
                $o .= L10n::t('No friends to display.');
                return $o;
        }
@@ -79,7 +81,7 @@ function allfriends_content(App $a)
                        'url'          => $rr['url'],
                        'itemurl'      => defaults($contact_details, 'addr', $rr['url']),
                        'name'         => htmlentities($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'],