- $id = 0;
-
- $entries = [];
- foreach ($common_friends as $common_friend) {
- //get further details of the contact
- $contact_details = Model\Contact::getDetailsByURL($common_friend['url'], $uid);
-
- // $rr['id'] is needed to use contact_photo_menu()
- /// @TODO Adding '/" here avoids E_NOTICE on missing constants
- $common_friend['id'] = $common_friend['cid'];
-
- $photo_menu = Model\Contact::photoMenu($common_friend);
-
- $entry = [
- 'url' => $common_friend['url'],
- 'itemurl' => defaults($contact_details, 'addr', $common_friend['url']),
- 'name' => $contact_details['name'],
- 'thumb' => ProxyUtils::proxifyUrl($contact_details['thumb'], false, ProxyUtils::SIZE_THUMB),
- 'img_hover' => $contact_details['name'],
- 'details' => $contact_details['location'],
- 'tags' => $contact_details['keywords'],
- 'about' => $contact_details['about'],
- 'account_type' => Model\Contact::getAccountType($contact_details),
- 'network' => ContactSelector::networkToName($contact_details['network'], $contact_details['url']),
- 'photo_menu' => $photo_menu,
- 'id' => ++$id,
- ];
- $entries[] = $entry;
- }
-