From 7e6e77b62692cd5f76b302e928d58279cf5d3c6d Mon Sep 17 00:00:00 2001 From: Alexey Shpakovsky Date: Sun, 30 May 2021 17:20:44 +0200 Subject: [PATCH] add nickname --- abook_class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/abook_class.php b/abook_class.php index a02f2cf..5273fc5 100755 --- a/abook_class.php +++ b/abook_class.php @@ -68,8 +68,8 @@ class abook_carddav extends addressbook_backend { $nickname = substr($uri, $this->abook_uri_len); $label = (string)$vcard->ORG; } else { - $nickname = (string)$vcard->ORG; - $label = ''; + $nickname = (string)$vcard->NICKNAME; + $label = (string)$vcard->ORG; } if(!$email) { $email = (string)$vcard->EMAIL; @@ -103,7 +103,7 @@ class abook_carddav extends addressbook_backend { */ function run_query($query, $match_all=false, $limit=0) { $ret = array(); - $all=$this->abook->query($query,["FN", "N", "EMAIL", "ORG"],$match_all,$limit); + $all=$this->abook->query($query,["FN", "N", "EMAIL", "NICKNAME", "ORG"],$match_all,$limit); /* Returns an array of matched VCards: The keys of the array are the URIs of the vcards