Skip to content
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

fix searching and ordering on getlastmodified #3824

Merged
merged 3 commits into from Mar 14, 2017

Conversation

icewind1991
Copy link
Member

Example query:

curl -u test:test -X SEARCH https://localcloud.icewind.me/remote.php/dav -H 'Content-Type: text/xml' --data '<?xml version="1.0" encoding="UTF-8"?><d:searchrequest xmlns:d="DAV:" xmlns:oc="http://nextcloud.com/ns"><d:basicsearch><d:select><d:prop><d:getcontenttype/><d:resourcetype/><d:getcontentlength/><d:getlastmodified/><d:getetag/><oc:permissions xmlns:oc="http://owncloud.org/ns"/><oc:id xmlns:oc="http://owncloud.org/ns"/><oc:size xmlns:oc="http://owncloud.org/ns"/><oc:favorite xmlns:oc="http://owncloud.org/ns"/></d:prop></d:select><d:from><d:scope><d:href>/files/test</d:href><d:depth>infinity</d:depth></d:scope></d:from><d:where><d:gt><d:prop><d:getlastmodified/></d:prop><d:literal>2017-03-10T22:06:30Z</d:literal></d:gt></d:where><d:orderby><d:order><d:prop><d:getlastmodified/></d:prop><d:descending/></d:order></d:orderby></d:basicsearch></d:searchrequest>'

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Mar 13, 2017
@icewind1991 icewind1991 added this to the Nextcloud 12.0 milestone Mar 13, 2017
@icewind1991
Copy link
Member Author

Fixes #3815

@mario
Copy link
Contributor

mario commented Mar 13, 2017

@icewind1991 looks good as far as d:getlastmodified is concerned, but ordering (d:ascending or d:descending) seems to have no influence on the output?

@icewind1991
Copy link
Member Author

Will fix in a separate PR

@mario
Copy link
Contributor

mario commented Mar 13, 2017

👍 @icewind1991 then this one is fine.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the unit tests and it works 👍

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Mar 13, 2017
Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 merged commit 8217b16 into master Mar 14, 2017
@icewind1991 icewind1991 deleted the dav-search-getlastmodified branch March 14, 2017 13:43
This was referenced Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants