summaryrefslogtreecommitdiffstats
path: root/lib/private/contactsmanager.php
diff options
context:
space:
mode:
authorLEDfan <tobia@ledfan.be>2014-04-18 14:30:44 +0200
committerLEDfan <tobia@ledfan.be>2014-04-18 14:30:44 +0200
commitb78c1373b681102f2904a4270c45b3030ffe22a5 (patch)
tree6695b6a9a27f1b74b9001b538f823c9537291509 /lib/private/contactsmanager.php
parentd23c4697d0e28de2a4aa4e9289dcf42f32854ece (diff)
downloadnextcloud-server-b78c1373b681102f2904a4270c45b3030ffe22a5.tar.gz
nextcloud-server-b78c1373b681102f2904a4270c45b3030ffe22a5.zip
Add key to every contact
Diffstat (limited to 'lib/private/contactsmanager.php')
-rw-r--r--lib/private/contactsmanager.php7
1 files changed, 6 insertions, 1 deletions
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;