]> git.mxchange.org Git - friendica.git/blobdiff - mod/allfriends.php
Contact follow and unfollow workd partially
[friendica.git] / mod / allfriends.php
index 585f787cd70e77051ab87dcb4b489a2038aa11b5..7623a9cd06ca4cbba5be8bb9e15d4fe547b6729b 100644 (file)
@@ -8,10 +8,10 @@ use Friendica\Content\ContactSelector;
 use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
-use Friendica\Database\DBM;
 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';
@@ -35,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', 'uid', 'id'], ['id' => $cid, 'uid' => local_user()]);
 
-       if (!DBM::is_result($contact)) {
+       if (!DBA::isResult($contact)) {
                return;
        }
 
@@ -49,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;
        }
@@ -81,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'],
@@ -96,7 +96,7 @@ function allfriends_content(App $a)
                $entries[] = $entry;
        }
 
-       $tab_str = contacts_tab($a, $cid, 3);
+       $tab_str = contacts_tab($a, $contact, 4);
 
        $tpl = get_markup_template('viewcontact_template.tpl');