aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Files/FileSearchBackend.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(dav): throw invalid argument when property type does not matchfix/search-castFerdinand Thiessen2025-04-271-1/+7
| | | | | | | | | | * Resolves https://github.com/nextcloud/server/issues/49972 Currently a TypeError is thrown when casting fails, this lead to a HTTP 500 error. Instead throw a proper InvalidArgumentError so the user receives a HTTP 400. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore(apps): Apply new rector configuration to autouse classesCôme Chilliet2024-10-151-2/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Add SPDX headerAndy Scherzinger2024-05-271-23/+2
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* feat(dav): Support multiple scopes in DAV searchLouis Chemineau2024-04-171-17/+74
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-2/+2
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Fix is-define operatorLouis Chemineau2023-11-221-1/+1
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* implements search on null/notnull metadataMaxence Lange2023-11-221-9/+22
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* moving metadataqueryMaxence Lange2023-11-131-1/+1
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* Support getting and setting metadata in DAV requestsLouis Chemineau2023-11-081-23/+0
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* IFilesMetadataMaxence Lange2023-11-071-42/+60
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* Make sure to not pass null to DateTime::createFromFormatCôme Chilliet2022-11-141-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* add a limit to the amount of operators a client can add to a search queryRobin Appelman2022-09-081-0/+27
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix an issue with the search backend updateCarl Schwan2022-04-141-10/+10
| | | | | | And update autoloader Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add a metadata service to store file metadataCarl Schwan2022-04-131-6/+35
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #27635 from nextcloud/fix/datetime-constantsPytal2021-06-231-1/+1
|\ | | | | Fix usage of DateTime constants
| * Move DateTime::ATOM to DateTimeInterface::ATOMChristoph Wurst2021-06-231-1/+1
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | allow setting offset for queries not limited to the users home storageRobin Appelman2021-06-221-3/+1
|/ | | | | | multi-storage offset is cheap (enough) now Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code according to PSR2Christoph Wurst2020-04-101-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+1
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add offset for home limited searchesRoeland Jago Douma2019-12-101-1/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersChristoph Wurst2019-12-051-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Allow filtering the search results to the users home storageRobin Appelman2019-12-031-7/+75
| | | | | | | | | | | | | | | | | | | | This is done by adding a ```xml <d:eq> <d:prop> <oc:owner-id/> </d:prop> <d:literal>$userId</d:literal> </d:eq> ``` clause to the search query. Searching by `owner-id` can only be done with the current user id and the comparison can not be inside a `<d:not>` or `<d:or>` statement Signed-off-by: Robin Appelman <robin@icewind.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* cast timestamps older than unix epoch to 0Christian2018-08-271-1/+1
| | | This change solves issues #10870, which is caused by method castValue of class FileSearchBackend: It casts the timestamps older than the unix epoch to false., see my comment https://github.com/nextcloud/server/pull/10835#discussion_r212806153.
* disallow negative mtime in dav searchRobin Appelman2018-08-241-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Make displayname selectableRoeland Jago Douma2018-03-221-1/+1
| | | | It is dav. so if it is not properly set we just return a 404 anyway.
* CacheJail should apply limit and offset after searchingRoeland Jago Douma2018-02-071-1/+1
| | | | | | Else the results might not be correct. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Adjust to updated searchdav libraryRobin Appelman2018-02-071-67/+51
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Respect limit and order in webdav searchRoeland Jago Douma2018-02-071-3/+98
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersMorris Jobke2017-11-061-0/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* cache nodes from search resultsRobin Appelman2017-08-261-6/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Allow searching file by fileidRobin Appelman2017-04-051-3/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* safer casting of datetimeRobin Appelman2017-03-141-1/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix searching and ordering on getlastmodifiedRobin Appelman2017-03-131-2/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Allow searching for favoritesRobin Appelman2017-03-081-5/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add tests for filesearchbackendRobin Appelman2017-03-011-7/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Implement webdav SEARCHRobin Appelman2017-03-011-6/+198
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add icewind/searchdavRobin Appelman2017-02-281-0/+76
Signed-off-by: Robin Appelman <robin@icewind.nl>