summaryrefslogtreecommitdiffstats
path: root/apps/contacts/ajax/contacts.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2011-12-16 17:42:07 +0100
committerThomas Tanghus <thomas@tanghus.net>2011-12-16 17:42:07 +0100
commitfeeb0c742a57eb542f6e904dd4c8b5310bcc066a (patch)
tree8d422f84371d865dcdcdc60d95d4c3fcccd8b8e2 /apps/contacts/ajax/contacts.php
parent59ad0a6c9c9862792ec92f9ab53dfc30d54867fa (diff)
downloadnextcloud-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.php8
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']);