summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2018-03-09 11:21:21 +0100
committerGitHub <noreply@github.com>2018-03-09 11:21:21 +0100
commit054a45c079f45ddc9f192ba852ea49ebe132f3b3 (patch)
treeb43c58405cdc2ddd6a77344bbdba95ee818375c4 /lib
parent5924f9cb3089d76bf33e5d497ed79e2af9b28e7a (diff)
parent882096653e610fc1e60a521b4da42e576c3c4c7f (diff)
downloadnextcloud-server-054a45c079f45ddc9f192ba852ea49ebe132f3b3.tar.gz
nextcloud-server-054a45c079f45ddc9f192ba852ea49ebe132f3b3.zip
Merge pull request #8710 from nextcloud/followup/8596/tests-for-user-pagination
Tests for email collaborators pagination
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 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 {