use Friendica\Core\Config;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
+use Friendica\Core\Search;
use Friendica\Database\DBA;
use Friendica\Model\GContact;
-use Friendica\Model\Contact;
use Friendica\Model\GServer;
use Friendica\Network\Probe;
use Friendica\Util\Network;
}
}
- $x = Network::fetchUrl(get_server() . '/lsearch?p=1&n=500&search=' . urlencode($search));
+ $x = Network::fetchUrl(Search::getGlobalDirectory() . '/lsearch?p=1&n=500&search=' . urlencode($search));
$j = json_decode($x);
if (!empty($j->results)) {
continue;
}
- $server_url = Contact::getBasepath($jj->url);
+ $server_url = GContact::getBasepath($jj->url, true);
if ($server_url != '') {
if (!GServer::check($server_url)) {
Logger::info("Friendica server doesn't answer.", ['server' => $server_url]);