}
$contacts_addressbook[$contact['addressbookid']]['contacts'][] = array('id' => $contact['id'], 'addressbookid' => $contact['addressbookid'], 'displayname' => htmlspecialchars($display));
}
-
+unset($contacts_alphabet);
uasort($contacts_addressbook, 'cmp');
$tmpl = new OCP\Template("contacts", "part.contacts");
if(is_null($id) && count($contacts) > 0) {
$id = $contacts[0]['id'];
}
+unset($contacts);
if(!is_null($id)) {
$vcard = OC_Contacts_App::getContactVCard($id);
$details = OC_Contacts_VCard::structureContact($vcard);
$tmpl->assign('email_types', $email_types);
$tmpl->assign('categories', $categories);
$tmpl->assign('addressbooks', $addressbooks);
-$tmpl->assign('contacts', $contacts, false);
$tmpl->assign('details', $details );
$tmpl->assign('id',$id);
$tmpl->printPage();