]> source.dussan.org Git - nextcloud-server.git/commitdiff
Try to conserve some memory. Should fix oc-1106 for master.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 25 Jun 2012 15:26:44 +0000 (17:26 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 25 Jun 2012 15:26:44 +0000 (17:26 +0200)
apps/contacts/ajax/contacts.php
apps/contacts/index.php

index 2ce6de1696b6e146212db34034e4557d942ba1ed..4bb7801cb2d576bf15909f3336ff1754616915d4 100644 (file)
@@ -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");
index bdb52c123cef6032339c3167b202b64231b34449..f6b37409ea793b5a876ffd95d9699813829eb1b6 100644 (file)
@@ -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();