dependency lowering
This commit is contained in:
parent
e00f110ef1
commit
34a1e923dd
1 changed files with 5 additions and 7 deletions
|
@ -6,10 +6,8 @@ use Friendica\BaseModule;
|
||||||
use Friendica\Content\ContactSelector;
|
use Friendica\Content\ContactSelector;
|
||||||
use Friendica\Content\Pager;
|
use Friendica\Content\Pager;
|
||||||
use Friendica\Content\Widget;
|
use Friendica\Content\Widget;
|
||||||
use Friendica\Core\Config;
|
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
use Friendica\Core\Renderer;
|
use Friendica\Core\Renderer;
|
||||||
use Friendica\Database\DBA;
|
|
||||||
use Friendica\Util\Proxy as ProxyUtils;
|
use Friendica\Util\Proxy as ProxyUtils;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
use Friendica\Model;
|
use Friendica\Model;
|
||||||
|
@ -70,7 +68,7 @@ class DirectorySearch extends BaseModule
|
||||||
$pager->setItemsPerPage(80);
|
$pager->setItemsPerPage(80);
|
||||||
$results = Model\Search::searchLocal($search, $pager->getStart(), $pager->getItemsPerPage(), $community);
|
$results = Model\Search::searchLocal($search, $pager->getStart(), $pager->getItemsPerPage(), $community);
|
||||||
|
|
||||||
} elseif (strlen(Config::get('system', 'directory')) && empty($results)) {
|
} elseif (strlen($config->get('system', 'directory')) && empty($results)) {
|
||||||
$results = Model\Search::searchDirectory($search, $pager->getPage());
|
$results = Model\Search::searchDirectory($search, $pager->getPage());
|
||||||
$pager->setItemsPerPage($results->getItemsPage());
|
$pager->setItemsPerPage($results->getItemsPage());
|
||||||
}
|
}
|
||||||
|
@ -94,11 +92,11 @@ class DirectorySearch extends BaseModule
|
||||||
if ($result->getCid() > 0 || $result->getPcid() > 0) {
|
if ($result->getCid() > 0 || $result->getPcid() > 0) {
|
||||||
$connlnk = "";
|
$connlnk = "";
|
||||||
$conntxt = "";
|
$conntxt = "";
|
||||||
$contact = DBA::selectFirst('contact', [], [
|
$contact = Model\Contact::getById(
|
||||||
'id' => ($result->getCid() > 0) ? $result->getCid() : $result->getPcid()
|
($result->getCid() > 0) ? $result->getCid() : $result->getPcid()
|
||||||
]);
|
);
|
||||||
|
|
||||||
if (DBA::isResult($contact)) {
|
if (!empty($contact)) {
|
||||||
$photo_menu = Model\Contact::photoMenu($contact);
|
$photo_menu = Model\Contact::photoMenu($contact);
|
||||||
$details = Contact::getContactTemplateVars($contact);
|
$details = Contact::getContactTemplateVars($contact);
|
||||||
$alt_text = $details['alt_text'];
|
$alt_text = $details['alt_text'];
|
||||||
|
|
Loading…
Reference in a new issue