Changed SQL queries for looking up contacts to only query once and sort at the same time.
This commit is contained in:
parent
5e40653713
commit
d91a4fcaf3
3 changed files with 0 additions and 33 deletions
|
@ -61,6 +61,5 @@ foreach( $add as $propname){
|
|||
$vcard->addProperty($propname, $value, $prop_parameters);
|
||||
}
|
||||
$id = OC_Contacts_VCard::add($aid,$vcard->serialize());
|
||||
OC_Log::write('contacts','ajax/addcard.php - adding id: '.$id,OC_Log::DEBUG);
|
||||
|
||||
OC_Contacts_App::renderDetails($id, $vcard);
|
||||
|
|
|
@ -12,21 +12,6 @@ OC_JSON::checkAppEnabled('contacts');
|
|||
|
||||
$ids = OC_Contacts_Addressbook::activeIds(OC_User::getUser());
|
||||
$contacts = OC_Contacts_VCard::all($ids);
|
||||
//OC_Log::write('contacts','contacts.php: '.count($contacts).' contacts.',OC_Log::DEBUG);
|
||||
/*
|
||||
$addressbooks = OC_Contacts_Addressbook::active(OC_User::getUser());
|
||||
$contacts = array();
|
||||
foreach( $addressbooks as $addressbook ){
|
||||
$addressbookcontacts = OC_Contacts_VCard::all($addressbook['id']);
|
||||
foreach( $addressbookcontacts as $contact ){
|
||||
if(is_null($contact['fullname'])){
|
||||
continue;
|
||||
}
|
||||
$contacts[] = $contact;
|
||||
}
|
||||
}
|
||||
usort($contacts,'contacts_namesort');
|
||||
*/
|
||||
$tmpl = new OC_TEMPLATE("contacts", "part.contacts");
|
||||
$tmpl->assign('contacts', $contacts);
|
||||
$page = $tmpl->fetchPage();
|
||||
|
|
|
@ -42,23 +42,6 @@ OC_App::setActiveNavigationEntry( 'contacts_index' );
|
|||
|
||||
// Load a specific user?
|
||||
$id = isset( $_GET['id'] ) ? $_GET['id'] : null;
|
||||
/*
|
||||
// sort addressbooks (use contactsort)
|
||||
usort($addressbooks,'contacts_namesort');
|
||||
|
||||
$contacts = array();
|
||||
foreach( $addressbooks as $addressbook ){
|
||||
$addressbookcontacts = OC_Contacts_VCard::all($addressbook['id']);
|
||||
foreach( $addressbookcontacts as $contact ){
|
||||
if(is_null($contact['fullname'])){
|
||||
continue;
|
||||
}
|
||||
$contacts[] = $contact;
|
||||
}
|
||||
}
|
||||
|
||||
usort($contacts,'contacts_namesort');
|
||||
*/
|
||||
$details = array();
|
||||
|
||||
// FIXME: This cannot work..?
|
||||
|
|
Loading…
Reference in a new issue