diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-09-13 21:42:47 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-09-15 19:44:19 +0200 |
commit | ae1fdf73c2d63692162433c6f4c37d80941787ca (patch) | |
tree | f2ad53905424a2ffea15f0ad36593d7005999cf9 | |
parent | 66a5a45c503269699666df61c605d67f3c72c7c0 (diff) | |
download | nextcloud-server-ae1fdf73c2d63692162433c6f4c37d80941787ca.tar.gz nextcloud-server-ae1fdf73c2d63692162433c6f4c37d80941787ca.zip |
Improve sharing pagination
Basically we did in almost all cases did a query to much.
This resulted in an extra query for each share type.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | lib/private/Share20/Manager.php | 5 |
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; } |