diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2011-12-16 17:42:07 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2011-12-16 17:42:07 +0100 |
commit | feeb0c742a57eb542f6e904dd4c8b5310bcc066a (patch) | |
tree | 8d422f84371d865dcdcdc60d95d4c3fcccd8b8e2 /apps/contacts/ajax/contacts.php | |
parent | 59ad0a6c9c9862792ec92f9ab53dfc30d54867fa (diff) | |
download | nextcloud-server-feeb0c742a57eb542f6e904dd4c8b5310bcc066a.tar.gz nextcloud-server-feeb0c742a57eb542f6e904dd4c8b5310bcc066a.zip |
Misc. changes after review by bartv.
Diffstat (limited to 'apps/contacts/ajax/contacts.php')
-rw-r--r-- | apps/contacts/ajax/contacts.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/contacts/ajax/contacts.php b/apps/contacts/ajax/contacts.php index 3c3bb5fe955..b34cf414249 100644 --- a/apps/contacts/ajax/contacts.php +++ b/apps/contacts/ajax/contacts.php @@ -7,16 +7,14 @@ */ function contacts_namesort($a,$b){ - return strcmp($a['fullname'],$b['fullname']); + return strcasecmp($a['fullname'],$b['fullname']); } require_once('../../../lib/base.php'); -if(!OC_USER::isLoggedIn()) { - die("<script type=\"text/javascript\">document.location = oc_webroot;</script>"); -} +OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('contacts'); -$addressbooks = OC_Contacts_Addressbook::activeAddressbooks(OC_User::getUser()); +$addressbooks = OC_Contacts_Addressbook::active(OC_User::getUser()); $contacts = array(); foreach( $addressbooks as $addressbook ){ $addressbookcontacts = OC_Contacts_VCard::all($addressbook['id']); |