]> git.mxchange.org Git - friendica.git/blobdiff - mod/match.php
Fetch photo fields, ensuring that they are filled
[friendica.git] / mod / match.php
index 747e0b2f0379f7211521b49b8707bcd1cb37ec31..f50a454ba9da919c05bbd578fe16ecbff70f387d 100644 (file)
@@ -27,8 +27,6 @@ use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Profile;
-use Friendica\Util\Network;
-use Friendica\Util\Proxy as ProxyUtils;
 
 /**
  * Controller for /match.
@@ -60,7 +58,7 @@ function match_content(App $a)
                return '';
        }
        if (!$profile['pub_keywords'] && (!$profile['prv_keywords'])) {
-               notice(DI::l10n()->t('No keywords to match. Please add keywords to your profile.') . EOL);
+               notice(DI::l10n()->t('No keywords to match. Please add keywords to your profile.'));
                return '';
        }
 
@@ -76,7 +74,7 @@ function match_content(App $a)
                $host = DI::baseUrl();
        }
 
-       $msearch_json = Network::post($host . '/msearch', $params)->getBody();
+       $msearch_json = DI::httpRequest()->post($host . '/msearch', $params)->getBody();
 
        $msearch = json_decode($msearch_json);
 
@@ -112,7 +110,7 @@ function match_content(App $a)
                                'tags'         => $contact_details['keywords'] ?? '',
                                'about'        => $contact_details['about'] ?? '',
                                'account_type' => Contact::getAccountType($contact_details),
-                               'thumb'        => ProxyUtils::proxifyUrl($profile->photo, false, ProxyUtils::SIZE_THUMB),
+                               'thumb'        => Contact::getThumb($contact_details, $profile->photo),
                                'conntxt'      => DI::l10n()->t('Connect'),
                                'connlnk'      => $connlnk,
                                'img_hover'    => $profile->tags,
@@ -141,7 +139,7 @@ function match_content(App $a)
        }
 
        if (empty($entries)) {
-               info(DI::l10n()->t('No matches') . EOL);
+               info(DI::l10n()->t('No matches'));
        }
 
        $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');