summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-09-18 14:34:15 +0200
committerGitHub <noreply@github.com>2017-09-18 14:34:15 +0200
commitca5c3f839affb1acefc3b3d4170e13a030da613f (patch)
tree8958ca3af5dcd1cdcded28d440b6c809027abc5a /lib
parenta06ba68919f4b42dad5ffdd31223cc53b0a0d518 (diff)
parentae1fdf73c2d63692162433c6f4c37d80941787ca (diff)
downloadnextcloud-server-ca5c3f839affb1acefc3b3d4170e13a030da613f.tar.gz
nextcloud-server-ca5c3f839affb1acefc3b3d4170e13a030da613f.zip
Merge pull request #6490 from nextcloud/share_pagination_query
Improve sharing pagination
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 6546fc48141..b4c4c7292fd 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1053,6 +1053,11 @@ class Manager implements IManager {
}
}
+ // If we did not fetch more shares than the limit then there are no more shares
+ if (count($shares) < $limit) {
+ break;
+ }
+
if (count($shares2) === $limit) {
break;
}