]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add key to every contact
authorLEDfan <tobia@ledfan.be>
Fri, 18 Apr 2014 12:30:44 +0000 (14:30 +0200)
committerLEDfan <tobia@ledfan.be>
Fri, 18 Apr 2014 12:30:44 +0000 (14:30 +0200)
lib/private/contactsmanager.php

index 1cb3da7098f89fa3916f97b6f776204b0c7be6fa..47ade48dcf0591ef752feb69d60d664e315a534c 100644 (file)
@@ -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;