X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBaseSearch.php;h=cc8fab8f7e5619511ad55b9f41f39dbade71e9aa;hb=8038c1b04ffa723ebd28610fb72927d8d21b3577;hp=276598131b6411513fef1eb3b1fae9655bf519d1;hpb=4b8c63121637778261f7aa19f6a2999c9dd99714;p=friendica.git diff --git a/src/Module/BaseSearch.php b/src/Module/BaseSearch.php index 276598131b..cc8fab8f7e 100644 --- a/src/Module/BaseSearch.php +++ b/src/Module/BaseSearch.php @@ -1,6 +1,6 @@ isMobile()) { - $itemsPerPage = DI::pConfig()->get(local_user(), 'system', 'itemspage_mobile_network', + $itemsPerPage = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'itemspage_mobile_network', DI::config()->get('system', 'itemspage_network_mobile')); } else { - $itemsPerPage = DI::pConfig()->get(local_user(), 'system', 'itemspage_network', + $itemsPerPage = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'itemspage_network', DI::config()->get('system', 'itemspage_network')); } @@ -116,7 +116,7 @@ class BaseSearch extends BaseModule protected static function printResult(ResultList $results, Pager $pager, string $header = ''): string { if ($results->getTotal() == 0) { - notice(DI::l10n()->t('No matches')); + DI::sysmsg()->addNotice(DI::l10n()->t('No matches')); return ''; } @@ -125,14 +125,14 @@ class BaseSearch extends BaseModule // in case the result is a contact result, add a contact-specific entry if ($result instanceof ContactResult) { - $contact = Model\Contact::getByURLForUser($result->getUrl(), local_user()); + $contact = Model\Contact::getByURLForUser($result->getUrl(), DI::userSession()->getLocalUserId()); if (!empty($contact)) { $entries[] = Contact::getContactTemplateVars($contact); } } } - $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl'); + $tpl = Renderer::getMarkupTemplate('contact/list.tpl'); return Renderer::replaceMacros($tpl, [ 'title' => $header, '$contacts' => $entries,