use incremental numbers for nicks
This commit is contained in:
parent
520458beae
commit
5874e561d1
1 changed files with 2 additions and 1 deletions
|
@ -169,12 +169,13 @@ class abook_carddav extends addressbook_backend {
|
||||||
The keys of the array are the URIs of the vcards
|
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)
|
The values are associative arrays with keys etag (type: string) and vcard (type: VCard)
|
||||||
*/
|
*/
|
||||||
|
$id=1;
|
||||||
foreach($all as $uri => $one) {
|
foreach($all as $uri => $one) {
|
||||||
$vcard = $one['vcard'];
|
$vcard = $one['vcard'];
|
||||||
$names = $vcard->N->getParts();
|
$names = $vcard->N->getParts();
|
||||||
// last,first,additional,prefix,suffix
|
// last,first,additional,prefix,suffix
|
||||||
array_push($ret,array(
|
array_push($ret,array(
|
||||||
'nickname' => $uri,
|
'nickname' => 'id'.$id++,
|
||||||
'name' => (string)$vcard->FN,
|
'name' => (string)$vcard->FN,
|
||||||
'firstname' => (string)$names[1],
|
'firstname' => (string)$names[1],
|
||||||
'lastname' => (string)$names[0],
|
'lastname' => (string)$names[0],
|
||||||
|
|
Loading…
Reference in a new issue