From 5874e561d1177e34b59e3ade78943f2f12afa1c0 Mon Sep 17 00:00:00 2001 From: Alexey Shpakovsky Date: Fri, 28 May 2021 23:49:25 +0200 Subject: [PATCH] use incremental numbers for nicks --- abook_class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/abook_class.php b/abook_class.php index c7661b1..8ecfcd8 100755 --- a/abook_class.php +++ b/abook_class.php @@ -169,12 +169,13 @@ class abook_carddav extends addressbook_backend { The keys of the array are the URIs of the vcards The values are associative arrays with keys etag (type: string) and vcard (type: VCard) */ + $id=1; foreach($all as $uri => $one) { $vcard = $one['vcard']; $names = $vcard->N->getParts(); // last,first,additional,prefix,suffix array_push($ret,array( - 'nickname' => $uri, + 'nickname' => 'id'.$id++, 'name' => (string)$vcard->FN, 'firstname' => (string)$names[1], 'lastname' => (string)$names[0],