[Pkg-owncloud-commits] [owncloud] 119/205: search address book for federated cloud id

David Prévot taffit at moszumanska.debian.org
Thu Jul 2 17:37:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit f9dcb559e9693e7706184f4d48f20eee096b6c7f
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Thu Jun 25 11:57:03 2015 +0200

    search address book for federated cloud id
---
 core/ajax/share.php | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/core/ajax/share.php b/core/ajax/share.php
index e78d274..4ce6773 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());

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list