summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-10-18 12:33:23 +0200
committerJulius Härtl <jus@bitgrid.net>2018-10-30 10:19:34 +0100
commit870e01518d1d0741b4f51eebaf5be186fd43cbf1 (patch)
tree82ee84b9c01d4f5af40abc62037841f9369262d9 /lib
parent8b92a6c9cb0e4dea84aa0bfac75ad05c358d0b23 (diff)
downloadnextcloud-server-870e01518d1d0741b4f51eebaf5be186fd43cbf1.tar.gz
nextcloud-server-870e01518d1d0741b4f51eebaf5be186fd43cbf1.zip
Add type to Remote and Mail plugins
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Collaboration/Collaborators/MailPlugin.php4
-rw-r--r--lib/private/Collaboration/Collaborators/RemotePlugin.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php
index 9abbc0f3afd..e89e22d012e 100644
--- a/lib/private/Collaboration/Collaborators/MailPlugin.php
+++ b/lib/private/Collaboration/Collaborators/MailPlugin.php
@@ -87,7 +87,7 @@ class MailPlugin implements ISearchPlugin {
if (!is_array($emailAddresses)) {
$emailAddresses = [$emailAddresses];
}
- foreach ($emailAddresses as $emailAddress) {
+ foreach ($emailAddresses as $type => $emailAddress) {
$displayName = $emailAddress;
if (isset($contact['FN'])) {
$displayName = $contact['FN'] . ' (' . $emailAddress . ')';
@@ -163,6 +163,7 @@ class MailPlugin implements ISearchPlugin {
$result['exact'][] = [
'label' => $displayName,
'uuid' => $contact['UID'],
+ 'type' => $type,
'value' => [
'shareType' => Share::SHARE_TYPE_EMAIL,
'shareWith' => $emailAddress,
@@ -172,6 +173,7 @@ class MailPlugin implements ISearchPlugin {
$result['wide'][] = [
'label' => $displayName,
'uuid' => $contact['UID'],
+ 'type' => $type,
'value' => [
'shareType' => Share::SHARE_TYPE_EMAIL,
'shareWith' => $emailAddress,
diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php
index af28c97c108..bde6d15b7b6 100644
--- a/lib/private/Collaboration/Collaborators/RemotePlugin.php
+++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php
@@ -71,7 +71,7 @@ class RemotePlugin implements ISearchPlugin {
$cloudIds = [$cloudIds];
}
$lowerSearch = strtolower($search);
- foreach ($cloudIds as $cloudId) {
+ foreach ($cloudIds as $type => $cloudId) {
try {
list($remoteUser, $serverUrl) = $this->splitUserRemote($cloudId);
} catch (\InvalidArgumentException $e) {
@@ -90,6 +90,7 @@ class RemotePlugin implements ISearchPlugin {
$result['exact'][] = [
'label' => $contact['FN'] . " ($cloudId)",
'uuid' => $contact['UID'],
+ 'type' => $type,
'value' => [
'shareType' => Share::SHARE_TYPE_REMOTE,
'shareWith' => $cloudId,
@@ -100,6 +101,7 @@ class RemotePlugin implements ISearchPlugin {
$result['wide'][] = [
'label' => $contact['FN'] . " ($cloudId)",
'uuid' => $contact['UID'],
+ 'type' => $type,
'value' => [
'shareType' => Share::SHARE_TYPE_REMOTE,
'shareWith' => $cloudId,