summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-06-25 11:57:03 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-06-25 11:57:03 +0200
commitf9dcb559e9693e7706184f4d48f20eee096b6c7f (patch)
tree56be4f92b3ca4af759afb5869e7ce467e2c4fdcb /core
parent7a3cfbc3c8d7e2453e962ace592212f00148176e (diff)
downloadnextcloud-server-f9dcb559e9693e7706184f4d48f20eee096b6c7f.tar.gz
nextcloud-server-f9dcb559e9693e7706184f4d48f20eee096b6c7f.zip
search address book for federated cloud id
Diffstat (limited to 'core')
-rw-r--r--core/ajax/share.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index e78d274815d..4ce67736ab9 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -352,8 +352,24 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
)
);
}
+ $contactManager = \OC::$server->getContactsManager();
+ $addressBookContacts = $contactManager->search($_GET['search'], ['CLOUD', 'FN']);
+ foreach ($addressBookContacts as $contact) {
+ if (isset($contact['CLOUD'])) {
+ foreach ($contact['CLOUD'] as $cloudId) {
+ $shareWith[] = array(
+ 'label' => $contact['FN'] . ' (' . $cloudId . ')',
+ 'value' => array(
+ 'shareType' => \OCP\Share::SHARE_TYPE_REMOTE,
+ 'shareWith' => $cloudId
+ )
+ );
+ }
+ }
+ }
}
+
$sorter = new \OC\Share\SearchResultSorter((string)$_GET['search'],
'label',
\OC::$server->getLogger());