"id" is not needed as a parameter
This commit is contained in:
parent
a4b5536d17
commit
ce7f192f35
6 changed files with 6 additions and 14 deletions
|
@ -117,13 +117,11 @@ function common_content(App $a)
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = 0;
|
|
||||||
|
|
||||||
$entries = [];
|
$entries = [];
|
||||||
foreach ($common_friends as $common_friend) {
|
foreach ($common_friends as $common_friend) {
|
||||||
$contact = Model\Contact::getByURLForUser($common_friend['url'], local_user());
|
$contact = Model\Contact::getByURLForUser($common_friend['url'], local_user());
|
||||||
if (!empty($contact)) {
|
if (!empty($contact)) {
|
||||||
$entries[] = Module\Contact::getContactTemplateVars($contact, ++$id);
|
$entries[] = Module\Contact::getContactTemplateVars($contact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ function match_content(App $a)
|
||||||
|
|
||||||
$contact = Contact::getByURLForUser($profile->url, local_user());
|
$contact = Contact::getByURLForUser($profile->url, local_user());
|
||||||
if (!empty($contact)) {
|
if (!empty($contact)) {
|
||||||
$entries[] = ModuleContact::getContactTemplateVars($contact, $i);
|
$entries[] = ModuleContact::getContactTemplateVars($contact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,11 +89,9 @@ function suggest_content(App $a)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = 0;
|
|
||||||
$entries = [];
|
$entries = [];
|
||||||
|
|
||||||
foreach ($contacts as $contact) {
|
foreach ($contacts as $contact) {
|
||||||
$entries[] = ModuleContact::getContactTemplateVars($contact, ++$id);
|
$entries[] = ModuleContact::getContactTemplateVars($contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
|
$tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
|
||||||
|
|
|
@ -72,13 +72,11 @@ class AllFriends extends BaseModule
|
||||||
return DI::l10n()->t('No friends to display.');
|
return DI::l10n()->t('No friends to display.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = 0;
|
|
||||||
|
|
||||||
$entries = [];
|
$entries = [];
|
||||||
foreach ($friends as $friend) {
|
foreach ($friends as $friend) {
|
||||||
$contact = Model\Contact::getByURLForUser($friend['url'], local_user());
|
$contact = Model\Contact::getByURLForUser($friend['url'], local_user());
|
||||||
if (!empty($contact)) {
|
if (!empty($contact)) {
|
||||||
$entries[] = Contact::getContactTemplateVars($contact, ++$id);
|
$entries[] = Contact::getContactTemplateVars($contact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,6 @@ class BaseSearch extends BaseModule
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = 0;
|
|
||||||
$entries = [];
|
$entries = [];
|
||||||
foreach ($results->getResults() as $result) {
|
foreach ($results->getResults() as $result) {
|
||||||
|
|
||||||
|
@ -126,7 +125,7 @@ class BaseSearch extends BaseModule
|
||||||
if ($result instanceof ContactResult) {
|
if ($result instanceof ContactResult) {
|
||||||
$contact = Model\Contact::getByURLForUser($result->getUrl(), local_user());
|
$contact = Model\Contact::getByURLForUser($result->getUrl(), local_user());
|
||||||
if (!empty($contact)) {
|
if (!empty($contact)) {
|
||||||
$entries[] = Contact::getContactTemplateVars($contact, ++$id);
|
$entries[] = Contact::getContactTemplateVars($contact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1016,7 +1016,7 @@ class Contact extends BaseModule
|
||||||
* @param integer $id
|
* @param integer $id
|
||||||
* @return array Template fields
|
* @return array Template fields
|
||||||
*/
|
*/
|
||||||
public static function getContactTemplateVars(array $rr, int $id = 0)
|
public static function getContactTemplateVars(array $rr)
|
||||||
{
|
{
|
||||||
$dir_icon = '';
|
$dir_icon = '';
|
||||||
$alt_text = '';
|
$alt_text = '';
|
||||||
|
@ -1085,7 +1085,6 @@ class Contact extends BaseModule
|
||||||
'url' => $url,
|
'url' => $url,
|
||||||
'network' => ContactSelector::networkToName($rr['network'], $rr['url'], $rr['protocol']),
|
'network' => ContactSelector::networkToName($rr['network'], $rr['url'], $rr['protocol']),
|
||||||
'nick' => $rr['nick'],
|
'nick' => $rr['nick'],
|
||||||
'id' => $id,
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue