summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-10-31 14:49:01 +0100
committerGitHub <noreply@github.com>2017-10-31 14:49:01 +0100
commit6ddda3d7d4173bf0203bd2556f7a2d13aea22195 (patch)
tree7958f625dbdfe4eacf1de8aa5cbe404a8c875715 /lib/private
parentbdf7f57890b82ec257ac9aab2ab314144d0c82f6 (diff)
parent43b92b8e06a7dbf0c70ee9433eae050227af6419 (diff)
downloadnextcloud-server-6ddda3d7d4173bf0203bd2556f7a2d13aea22195.tar.gz
nextcloud-server-6ddda3d7d4173bf0203bd2556f7a2d13aea22195.zip
Merge pull request #6952 from nextcloud/correctly-search-for-results
Correctly search for existing collaboration results
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Collaboration/Collaborators/SearchResult.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Collaboration/Collaborators/SearchResult.php b/lib/private/Collaboration/Collaborators/SearchResult.php
index 7b32b388203..184c1f69a1b 100644
--- a/lib/private/Collaboration/Collaborators/SearchResult.php
+++ b/lib/private/Collaboration/Collaborators/SearchResult.php
@@ -52,7 +52,7 @@ class SearchResult implements ISearchResult {
$this->exactIdMatches[$type->getLabel()] = 1;
}
- public function hasExactIdMatch(SearchResultType$type) {
+ public function hasExactIdMatch(SearchResultType $type) {
return isset($this->exactIdMatches[$type->getLabel()]);
}
@@ -64,8 +64,10 @@ class SearchResult implements ISearchResult {
$resultArrays = [$this->result['exact'][$type], $this->result[$type]];
foreach($resultArrays as $resultArray) {
- if ($resultArray['value']['shareWith'] === $collaboratorId) {
- return true;
+ foreach ($resultArray as $result) {
+ if ($result['value']['shareWith'] === $collaboratorId) {
+ return true;
+ }
}
}