Add type to Remote and Mail plugins
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
8b92a6c9cb
commit
870e01518d
2 changed files with 6 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue