Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-02-06 20:11:44 +0300
committerJoas Schilling <coding@schilljs.com>2018-02-20 19:47:54 +0300
commitd63caf5829fd3f69f5b42a75cc50bf2fc267582b (patch)
treedc84cc7d84b9538703a6327de214a250ed395e7a /lib
parenta3de507b7626919a42ef6a86d94af30b0f04f3a9 (diff)
Better result handling of email search
1. Local users should not be returned when searching for empty string 2. The limit of the response should be respected Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Collaboration/Collaborators/MailPlugin.php2
-rw-r--r--lib/private/Collaboration/Collaborators/RemotePlugin.php2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Collaboration/Collaborators/MailPlugin.php b/lib/private/Collaboration/Collaborators/MailPlugin.php
index 2e946c4a872..99629f213e1 100644
--- a/lib/private/Collaboration/Collaborators/MailPlugin.php
+++ b/lib/private/Collaboration/Collaborators/MailPlugin.php
@@ -173,6 +173,8 @@ class MailPlugin implements ISearchPlugin {
if (!$this->shareeEnumeration) {
$result['wide'] = [];
+ } else {
+ $result['wide'] = array_slice($result['wide'], $offset, $limit);
}
if (!$searchResult->hasExactIdMatch($emailType) && filter_var($search, FILTER_VALIDATE_EMAIL)) {
diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php
index b17a64e4ff1..e0f5298f83b 100644
--- a/lib/private/Collaboration/Collaborators/RemotePlugin.php
+++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php
@@ -102,6 +102,8 @@ class RemotePlugin implements ISearchPlugin {
if (!$this->shareeEnumeration) {
$result['wide'] = [];
+ } else {
+ $result['wide'] = array_slice($result['wide'], $offset, $limit);
}
if (!$searchResult->hasExactIdMatch($resultType) && $this->cloudIdManager->isValidCloudId($search) && $offset === 0) {