mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
13 lines
542 B
PHP
13 lines
542 B
PHP
<?php foreach( $_['contacts'] as $contact ):
|
|
$display = trim($contact['fullname']);
|
|
if(!$display) {
|
|
$vcard = OC_Contacts_App::getContactVCard($contact['id']);
|
|
if(!is_null($vcard)) {
|
|
$struct = OC_Contacts_VCard::structureContact($vcard);
|
|
$display = isset($struct['EMAIL'][0])?$struct['EMAIL'][0]['value']:'[UNKNOWN]';
|
|
}
|
|
}
|
|
?>
|
|
<li book-id="<?php echo $contact['addressbookid']; ?>" data-id="<?php echo $contact['id']; ?>"><a href="index.php?id=<?php echo $contact['id']; ?>"><?php echo $display; ?></a></li>
|
|
<?php endforeach; ?>
|