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>
This commit is contained in:
Roeland Jago Douma 2017-09-13 21:42:47 +02:00
parent 66a5a45c50
commit ae1fdf73c2
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}