mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 15:54:26 +02:00
Replace "gcontact" with "contact" - imroved suggestions
This commit is contained in:
parent
7441bd90c8
commit
cc85bc4156
7 changed files with 201 additions and 238 deletions
|
@ -118,20 +118,19 @@ function vier_community_info()
|
|||
|
||||
// comunity_profiles
|
||||
if ($show_profiles) {
|
||||
$r = GContact::suggestionQuery(local_user(), 0, 9);
|
||||
$contacts = Contact::getSuggestions(local_user(), 0, 9);
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('ch_directory_item.tpl');
|
||||
if (DBA::isResult($r)) {
|
||||
if (DBA::isResult($contacts)) {
|
||||
$aside['$comunity_profiles_title'] = DI::l10n()->t('Community Profiles');
|
||||
$aside['$comunity_profiles_items'] = [];
|
||||
|
||||
foreach ($r as $rr) {
|
||||
$contact = Contact::getByURL($rr['url']);
|
||||
foreach ($contacts as $contact) {
|
||||
$entry = Renderer::replaceMacros($tpl, [
|
||||
'$id' => $rr['id'],
|
||||
'$profile_link' => 'follow/?url='.urlencode($rr['url']),
|
||||
'$photo' => Contact::getMicro($contact, $rr['photo']),
|
||||
'$alt_text' => $contact['name'] ?? $rr['name'],
|
||||
'$id' => $contact['id'],
|
||||
'$profile_link' => 'follow/?url='.urlencode($contact['url']),
|
||||
'$photo' => Contact::getMicro($contact),
|
||||
'$alt_text' => $contact['name'],
|
||||
]);
|
||||
$aside['$comunity_profiles_items'][] = $entry;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue