From b78c1373b681102f2904a4270c45b3030ffe22a5 Mon Sep 17 00:00:00 2001 From: LEDfan Date: Fri, 18 Apr 2014 14:30:44 +0200 Subject: [PATCH] Add key to every contact --- lib/private/contactsmanager.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 2.39.5