]> git.mxchange.org Git - friendica.git/blobdiff - mod/dirfind.php
[Composer] Add dependency nikic/fast-route
[friendica.git] / mod / dirfind.php
index 909a723165b49c84b678535ba713ee38f1127930..a5b77312f35d03ba078a8700b67220a7acfea2ef 100644 (file)
@@ -179,21 +179,19 @@ function dirfind_content(App $a, $prefix = "") {
 
                        // Add found profiles from the global directory to the local directory
                        Worker::add(PRIORITY_LOW, 'DiscoverPoCo', "dirsearch", urlencode($search));
-               } else {
+               } elseif (strlen(Config::get('system','directory'))) {
                        $p = (($pager->getPage() != 1) ? '&p=' . $pager->getPage() : '');
 
-                       if (strlen(Config::get('system','directory'))) {
-                               $x = Network::fetchUrl(get_server() . '/lsearch?f=' . $p .  '&search=' . urlencode($search));
-                       }
+                       $x = Network::fetchUrl(get_server() . '/lsearch?f=' . $p .  '&search=' . urlencode($search));
 
                        $j = json_decode($x);
-
                        $pager->setItemsPerPage($j->items_page);
                }
 
                if (!empty($j->results)) {
                        $id = 0;
 
+                       $entries = [];
                        foreach ($j->results as $jj) {
 
                                $alt_text = "";