summaryrefslogtreecommitdiffstats
path: root/lib/private/Collaboration
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-03-07 11:57:08 +0100
committerJoas Schilling <coding@schilljs.com>2018-03-08 16:22:16 +0100
commit882096653e610fc1e60a521b4da42e576c3c4c7f (patch)
treeb207a9a778d492d5975632be798a6a2e18b47f90 /lib/private/Collaboration
parent3d7ae4aa97ba6c118429063a418500818ab86ea2 (diff)
downloadnextcloud-server-882096653e610fc1e60a521b4da42e576c3c4c7f.tar.gz
nextcloud-server-882096653e610fc1e60a521b4da42e576c3c4c7f.zip
Fix calculation if there are more results
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Collaboration')
-rw-r--r--lib/private/Collaboration/Collaborators/MailPlugin.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php
index c3816161ce3..ee5fcd60bdb 100644
--- a/lib/private/Collaboration/Collaborators/MailPlugin.php
+++ b/lib/private/Collaboration/Collaborators/MailPlugin.php
@@ -172,10 +172,14 @@ class MailPlugin implements ISearchPlugin {
}
}
+ $reachedEnd = true;
if (!$this->shareeEnumeration) {
$result['wide'] = [];
$userResults['wide'] = [];
} else {
+ $reachedEnd = (count($result['wide']) < $offset + $limit) &&
+ (count($userResults['wide']) < $offset + $limit);
+
$result['wide'] = array_slice($result['wide'], $offset, $limit);
$userResults['wide'] = array_slice($userResults['wide'], $offset, $limit);
}
@@ -196,7 +200,7 @@ class MailPlugin implements ISearchPlugin {
}
$searchResult->addResultSet($emailType, $result['wide'], $result['exact']);
- return true;
+ return !$reachedEnd;
}
public function isCurrentUser(ICloudId $cloud): bool {