use Friendica\Core\Hook;
use Friendica\Core\Session;
use Friendica\Core\Renderer;
+use Friendica\Core\Search;
use Friendica\DI;
use Friendica\Model;
use Friendica\Model\Profile;
$search = trim(rawurldecode($_REQUEST['search'] ?? ''));
$gDirPath = '';
- $dirURL = $config->get('system', 'directory');
+ $dirURL = Search::getGlobalDirectory();
if (strlen($dirURL)) {
$gDirPath = Profile::zrl($dirURL, true);
}
*
* @throws \Exception
*/
- public static function formatEntry(array $contact, $photo_size = 'photo')
+ public static function formatEntry(array $contact, string $photo_size = 'photo'): array
{
$itemurl = (($contact['addr'] != "") ? $contact['addr'] : $contact['url']);
'img_hover' => $contact['name'],
'name' => $contact['name'],
'details' => $details,
- 'account_type' => Model\Contact::getAccountType($contact['contact-type']),
+ 'account_type' => Model\Contact::getAccountType($contact['contact-type'] ?? 0),
'profile' => $profile,
'location' => $location_e,
'tags' => $contact['pub_keywords'],