-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add pagination compatibility to cardav backend #47909
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Hamza Mahjoubi <[email protected]>
$objs = $this->carddavBackend->getCards($this->addressBookInfo['id']); | ||
$offset = $_SERVER['HTTP_X_NEXTCLOUD_OFFSET']; | ||
$limit = $_SERVER['HTTP_X_NEXTCLOUD_LIMIT']; | ||
$objs = $this->carddavBackend->getCards($this->addressBookInfo['id'], $offset, $limit); |
Check failure
Code scanning / Psalm
InvalidArgument Error
$objs = $this->carddavBackend->getCards($this->addressBookInfo['id']); | ||
$offset = $_SERVER['HTTP_X_NEXTCLOUD_OFFSET']; | ||
$limit = $_SERVER['HTTP_X_NEXTCLOUD_LIMIT']; | ||
$objs = $this->carddavBackend->getCards($this->addressBookInfo['id'], $offset, $limit); |
Check failure
Code scanning / Psalm
InvalidArgument Error
I'd prefer a cursor based pagination if possible It's better for performance and more robust when the address book changes while the Contacts app is open |
@@ -157,7 +157,9 @@ public function getChild($name) { | |||
} | |||
|
|||
public function getChildren() { | |||
$objs = $this->carddavBackend->getCards($this->addressBookInfo['id']); | |||
$offset = $_SERVER['HTTP_X_NEXTCLOUD_OFFSET']; | |||
$limit = $_SERVER['HTTP_X_NEXTCLOUD_LIMIT']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to use the standardized limit: https://datatracker.ietf.org/doc/html/rfc6352#section-8.6.1
Summary
TODO
Checklist