]> git.mxchange.org Git - friendica.git/blobdiff - mod/suggest.php
Adjusted implementation to a better one (thanks to Michael Vogel)
[friendica.git] / mod / suggest.php
index c43ae47c18b1d67c7b5df172d4cc4f89db952327..1a4dbc5a13c2e25ab380cdced9d0459bc3591102 100644 (file)
@@ -11,6 +11,7 @@ use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Model\GContact;
+use Friendica\Util\Proxy as ProxyUtils;
 
 function suggest_init(App $a) {
        if (! local_user()) {
@@ -51,11 +52,10 @@ function suggest_init(App $a) {
 
 }
 
-function suggest_content(App $a) {
-
-       require_once("mod/proxy.php");
-
+function suggest_content(App $a)
+{
        $o = '';
+
        if (! local_user()) {
                notice(L10n::t('Permission denied.') . EOL);
                return;
@@ -74,6 +74,8 @@ function suggest_content(App $a) {
                return $o;
        }
 
+       $id = 0;
+
        foreach ($r as $rr) {
 
                $connlnk = System::baseUrl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
@@ -91,7 +93,7 @@ function suggest_content(App $a) {
                        'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
                        'img_hover' => $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),
                        'details'       => $contact_details['location'],
                        'tags'          => $contact_details['keywords'],
                        'about'         => $contact_details['about'],