summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-03-07 11:57:08 +0100
committerJoas Schilling <coding@schilljs.com>2018-03-09 10:16:42 +0100
commita2f3f0a681a49e08b89f27d94422b6b81d3ded21 (patch)
treed402c30363ba085010bd6fb0216b0fa5fc7a4e71 /lib
parenta31439e89d9f5a7f1f22c4da3761f60761fab186 (diff)
downloadnextcloud-server-a2f3f0a681a49e08b89f27d94422b6b81d3ded21.tar.gz
nextcloud-server-a2f3f0a681a49e08b89f27d94422b6b81d3ded21.zip
Fix calculation if there are more results
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-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 eb524b866a5..075689a068e 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) {