diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2018-03-09 11:21:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-09 11:21:21 +0100 |
commit | 054a45c079f45ddc9f192ba852ea49ebe132f3b3 (patch) | |
tree | b43c58405cdc2ddd6a77344bbdba95ee818375c4 /lib | |
parent | 5924f9cb3089d76bf33e5d497ed79e2af9b28e7a (diff) | |
parent | 882096653e610fc1e60a521b4da42e576c3c4c7f (diff) | |
download | nextcloud-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.php | 6 |
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 { |