add nickname

This commit is contained in:
Alexey Shpakovsky 2021-05-30 17:20:44 +02:00
parent 7c14888987
commit 7e6e77b626
No known key found for this signature in database
GPG key ID: 5797A726A2A4230A

View file

@ -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