From b78c1373b681102f2904a4270c45b3030ffe22a5 Mon Sep 17 00:00:00 2001 From: LEDfan Date: Fri, 18 Apr 2014 14:30:44 +0200 Subject: Add key to every contact --- lib/private/contactsmanager.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/contactsmanager.php b/lib/private/contactsmanager.php index 1cb3da7098f..47ade48dcf0 100644 --- a/lib/private/contactsmanager.php +++ b/lib/private/contactsmanager.php @@ -37,7 +37,12 @@ namespace OC { $result = array(); foreach($this->address_books as $address_book) { $r = $address_book->search($pattern, $searchProperties, $options); - $result = array_merge($result, $r); + $contacts = array(); + foreach($r as $c){ + $c['key'] = $address_book->getKey(); + $contacts[] = $c; + } + $result = array_merge($result, $contacts); } return $result; -- cgit v1.2.3 From efff7dd2a43b604bd883e4e0aca9a74e4bb81222 Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Tue, 22 Apr 2014 12:46:09 +0200 Subject: Change key to addressbook-key --- lib/private/contactsmanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/contactsmanager.php b/lib/private/contactsmanager.php index 47ade48dcf0..4299d88017a 100644 --- a/lib/private/contactsmanager.php +++ b/lib/private/contactsmanager.php @@ -39,7 +39,7 @@ namespace OC { $r = $address_book->search($pattern, $searchProperties, $options); $contacts = array(); foreach($r as $c){ - $c['key'] = $address_book->getKey(); + $c['addressbook-key'] = $address_book->getKey(); $contacts[] = $c; } $result = array_merge($result, $contacts); -- cgit v1.2.3