]> git.mxchange.org Git - friendica.git/blobdiff - mod/dirfind.php
Just some more fixed notice
[friendica.git] / mod / dirfind.php
index 14ceb6daee365077e1366060e10cd9c1c0f9102a..257c8b11aa44be12f7637feb9557a0449be28e97 100644 (file)
@@ -2,6 +2,7 @@
 /**
  * @file mod/dirfind.php
  */
+
 use Friendica\App;
 use Friendica\Content\ContactSelector;
 use Friendica\Content\Widget;
@@ -9,13 +10,13 @@ use Friendica\Core\Config;
 use Friendica\Core\L10n;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
+use Friendica\Database\dba;
+use Friendica\Database\DBM;
 use Friendica\Model\Contact;
 use Friendica\Model\GContact;
-use Friendica\Model\Profile;
 use Friendica\Network\Probe;
 use Friendica\Protocol\PortableContact;
 use Friendica\Util\Network;
-use Friendica\Database\DBM;
 
 require_once 'mod/contacts.php';
 
@@ -186,7 +187,7 @@ function dirfind_content(App $a, $prefix = "") {
                        $a->set_pager_itemspage($j->items_page);
                }
 
-               if (count($j->results)) {
+               if (!empty($j->results)) {
 
                        $id = 0;
 
@@ -214,7 +215,7 @@ function dirfind_content(App $a, $prefix = "") {
                                        $connlnk = System::baseUrl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
                                        $conntxt = L10n::t('Connect');
                                        $photo_menu = [
-                                               'profile' => [L10n::t("View Profile"), Profile::zrl($jj->url)],
+                                               'profile' => [L10n::t("View Profile"), Contact::magicLink($jj->url)],
                                                'follow' => [L10n::t("Connect/Follow"), $connlnk]
                                        ];
                                }
@@ -223,7 +224,7 @@ function dirfind_content(App $a, $prefix = "") {
 
                                $entry = [
                                        'alt_text' => $alt_text,
-                                       'url' => Profile::magicLink($jj->url),
+                                       'url' => Contact::magicLink($jj->url),
                                        'itemurl' => $itemurl,
                                        'name' => htmlentities($jj->name),
                                        'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),