<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
namespace Friendica\Module;
use Friendica\BaseModule;
-use Friendica\Content\ContactSelector;
use Friendica\Content\Pager;
use Friendica\Core\Renderer;
use Friendica\Core\Search;
*/
public static function performContactSearch($search, $prefix = '')
{
- $a = DI::app();
$config = DI::config();
$type = Search::TYPE_ALL;
return '';
}
- $id = 0;
$entries = [];
foreach ($results->getResults() as $result) {
// in case the result is a contact result, add a contact-specific entry
if ($result instanceof ContactResult) {
- $contact = Model\Contact::getByURL($result->getUrl());
+ $contact = Model\Contact::getByURLForUser($result->getUrl(), local_user());
if (!empty($contact)) {
- $entries[] = Model\Contact::getTemplateData($contact, ++$id);
+ $entries[] = Contact::getContactTemplateVars($contact);
}
}
}