Skip to content
Snippets Groups Projects
Commit ef93bf22 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

Try to conserve some memory. Should fix oc-1106 for master.

parent 09a9f540
Branches
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ foreach($contacts_alphabet as $contact) {
}
$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");
......
......@@ -28,6 +28,7 @@ $details = array();
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);
......@@ -66,7 +67,6 @@ $tmpl->assign('phone_types', $phone_types);
$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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment