aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | feat: add searchBySystemTag as PHP APIArthur Schiwon2023-06-211-0/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| | * | | fix: favorites view and universal search against tagsArthur Schiwon2023-06-211-17/+30
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| | * | | fix: change if with conditionless else to switch; and a parameter valueArthur Schiwon2023-06-212-20/+25
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| | * | | use efficient tag retrieval on DAV report requestArthur Schiwon2023-06-212-17/+27
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - uses DAV search approach against valid files joined by systemtag selector - reduced table join for tag/systemtag search - supports pagination - no changes to the output formats or similar Example request body: <?xml version="1.0"?> <oc:filter-files xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns" xmlns:ocs="http://open-collaboration-services.org/ns"> <d:prop> <d:getcontentlength/> <d:getcontenttype/> <d:getetag/> <d:getlastmodified/> <d:resourcetype/> <nc:face-detections/> <nc:file-metadata-size/> <nc:has-preview/> <nc:realpath/> <oc:favorite/> <oc:fileid/> <oc:permissions/> <nc:nbItems/> </d:prop> <oc:filter-rules> <oc:systemtag>32</oc:systemtag> </oc:filter-rules> <d:limit> <d:nresults>50</d:nresults> <nc:firstresult>0</nc:firstresult> </d:limit> </oc:filter-files> Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | Merge pull request #38858 from nextcloud/scanner-performance3Robin Appelman2023-06-262-14/+10
| |\ \ \ | | | | | | | | | | file scanner performance improvements
| | * | | file scanner performance improvementsRobin Appelman2023-06-162-14/+10
| | | |/ | | |/| | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | / | Clean-up some remaining readdir calls with undesirable false evaluation ↵Josh Richards2023-06-242-2/+2
|/ / / | | | | | | | | | | | | | | | potential Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
* | | Merge pull request #38625 from nextcloud/fix/noid/querysearchehelper-narrow-typeArthur Schiwon2023-06-246-41/+40
|\ \ \ | | | | | | | | fix: expect interface, not a specific implementation
| * | | ci: pro forma check of existence of internal methodArthur Schiwon2023-06-211-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | createNode() is protected and used by Folder, but being an internal-only method it shall not be exposed in the Folder or IRootFolder interface. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | refactor: declare getMount() and getMountsIn() at IRootFolderArthur Schiwon2023-06-214-23/+11
| | | | | | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | chore: ugly type jugglingArthur Schiwon2023-06-215-20/+32
| | | | | | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | fix: add typehine for IRootFolderArthur Schiwon2023-06-211-7/+5
| | | | | | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | fix: expect interface, not a specific implementationArthur Schiwon2023-06-211-3/+2
| | |/ | |/| | | | | | | | | | | | | | | | - fixes a regression when deleting folders while music app was enabled, for a LazyRoot was passed to this method. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | | dav: clean path before putting it in the statcacheRobin Appelman2023-06-231-0/+1
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | implement optimized getDirectoryContent for DAVRobin Appelman2023-06-221-96/+125
|/ / | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / use source cache when listing folder during recursive copyRobin Appelman2023-06-191-5/+6
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix deprecated method callDominik Fuchß2023-06-131-1/+2
| | | | Signed-off-by: Dominik Fuchß <develop@fuchss.org>
* Changes after code review.Dominik Fuchß2023-06-131-2/+7
| | | | Signed-off-by: Dominik Fuchß <develop@fuchss.org>
* Add config variable for curl timeoutDominik Fuchß2023-06-131-2/+6
| | | | | | Add the config variable for curl calls ("remote_curl_timeout"). E.g., needed for nextcloud federation. Signed-off-by: Dominik Fuchß <develop@fuchss.org>
* add utility command for object store objectsRobin Appelman2023-06-091-1/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Drop dead private methods in /libChristoph Wurst2023-06-061-13/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #38478 from nextcloud/backport/38440/masterSimon L2023-06-051-2/+2
|\ | | | | [master] fix: Catch Deadlock properly as execute throws Doctrine exceptions not our wrapped ones
| * fix: execute throws docrine exceptions not our wrapped onesJulius Härtl2023-05-261-2/+2
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_privateRobin Appelman2023-06-0121-36/+36
|\ \ | |/ |/| Refactors "strpos" calls in lib/private to improve code readability.
| * Update Detection.phpFaraz Samapoor2023-05-171-1/+1
| | | | | | | | | | | | | | The latter implies the former. https://github.com/nextcloud/server/pull/38261#discussion_r1196708412 Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
| * Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-1521-36/+36
| | | | | | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* | Merge pull request #38429 from tanganellilore/fix_delete_user_syslinkSimon L2023-05-261-2/+2
|\ \ | | | | | | Fix deletion of User when system link are used in him user folder
| * | invert elseif on rmdir for local storage Lorenzo Tanganelli2023-05-241-2/+2
| | | | | | | | | Signed-off-by: Lorenzo Tanganelli <lorenzo.tanganelli@hotmail.it>
* | | don't always check if we need to setup the object store rootRobin Appelman2023-05-231-6/+18
|/ / | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #38065 from nextcloud/fix-result-mimetype-loaderSimon L2023-05-161-16/+10
|\ \ | | | | | | fix(mimetype): Fix returning value when finding existing mimetype in MimeType Loader
| * | fix(mimetype): Fix returning value when finding existing mimetype in ↵Thomas Citharel2023-05-041-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MimeType Loader Also, only return the ID from the transaction as the mimetype string is already used from the function argument value Fixes https://github.com/nextcloud/server/pull/35744/files#r1184644610 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* | | Merge pull request #38196 from nextcloud/fix/fix-32bits-freespace-and-sizesCôme Chilliet2023-05-157-14/+17
|\ \ \ | | | | | | | | Get rid of more int casts in file size manipulations
| * | | Fix return types in phpdocCôme Chilliet2023-05-155-5/+5
| | | | | | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | | Get rid of more int casts in file size manipulationsCôme Chilliet2023-05-113-9/+12
| | | | | | | | | | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | | | Merge pull request #32961 from nextcloud/more-debug-lazyuserfolderCôme Chilliet2023-05-152-6/+18
|\ \ \ \ | |_|_|/ |/| | | Make it easier to debug issue #32304
| * | | Add back missing slash in LazyUserFolder pathCôme Chilliet2023-05-091-1/+1
| | | | | | | | | | | | Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
| * | | Make it easier to debug issue #32304Carl Schwan2023-05-042-7/+19
| | |/ | |/| | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | | Merge pull request #37709 from nextcloud/bugfix/deadlockJulius Härtl2023-05-131-2/+6
|\ \ \
| * | | fix: Check for wrapped retriable exceptionsJulius Härtl2023-05-021-2/+6
| | | | | | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | | Merge pull request #37621 from nextcloud/enh/lock-readable-pathJulius Härtl2023-05-131-0/+3
|\ \ \ \ | |_|_|/ |/| | |
| * | | fix: Wrap filesystem LockedExceptions for holding the readable pathJulius Härtl2023-05-021-0/+3
| |/ / | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | Merge pull request #37961 from nextcloud/poc/noid/systemtags-perfArthur Schiwon2023-05-113-54/+102
|\ \ \ | | | | | | | | SystemTags endpoint to return tags used by a user with meta data
| * | | refactor: remove where specification from SELECT getterArthur Schiwon2023-05-102-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - search constraints are now fully in control of SystemTagsInFilesDetector::detectAssignedSystemTagsIn(), avoids duplication of a WHERE statement Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | refactor: remove SystemTag logic from Folder into QuerySearchHelperArthur Schiwon2023-05-092-52/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - adds OC\SystemTag\SystemTagsInFilesDetector where the search logic is moved to Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | feat: specify media type via url path: systemtags-current/$mediaTypeArthur Schiwon2023-05-092-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - only the media part of the mime type can be search, but not the full mime type. It can be added, should it become necessary. - thus fixes previously hardcoded selector for image/ types - also fixes a return type hint - adds a return type hint Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * | | PoC: SystemTags endpoint to return tags used by a user with meta dataArthur Schiwon2023-05-093-46/+98
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target case is photos app: when visiting the tags category, all systemtags of the whole cloud are retrieved. In subequent steps the next tag is requested until the browser view is filled with tag tiles (i.e. previews are requested just as well). With this approach, we incorpoate the dav search and look for user related tags that are used by them, and already returns the statistics (number of files tagged with the respective tag) as well as a file id for the purpose to load the preview. This defaults to the file with the highest id. Call: curl -s -u 'user:password' \ 'https://my.nc.srv/remote.php/dav/systemtags-current' \ -X PROPFIND -H 'Accept: text/plain' \ -H 'Accept-Language: en-US,en;q=0.5' -H 'Depth: 1' \ -H 'Content-Type: text/plain;charset=UTF-8' \ --data @/home/doe/request-systemtag-props.xml With request-systemtag-props.xml: <?xml version="1.0" encoding="UTF-8"?> <d:propfind xmlns:d="DAV:"> <d:prop xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"> <oc:id/> <oc:display-name/> <oc:user-visible/> <oc:user-assignable/> <oc:can-assign/> <nc:files-assigned/> <nc:reference-fileid/> </d:prop> </d:propfind> Example output: … <d:response> <d:href>/master/remote.php/dav/systemtags/84</d:href> <d:propstat> <d:prop> <oc:id>84</oc:id> <oc:display-name>Computer</oc:display-name> <oc:user-visible>true</oc:user-visible> <oc:user-assignable>true</oc:user-assignable> <oc:can-assign>true</oc:can-assign> <nc:files-assigned>42</nc:files-assigned> <nc:reference-fileid>924022</nc:reference-fileid> </d:prop> <d:status>HTTP/1.1 200 OK</d:status> </d:propstat> </d:response> <d:response> <d:href>/remote.php/dav/systemtags/97</d:href> <d:propstat> <d:prop> <oc:id>97</oc:id> <oc:display-name>Bear</oc:display-name> <oc:user-visible>true</oc:user-visible> <oc:user-assignable>true</oc:user-assignable> <oc:can-assign>true</oc:can-assign> <nc:files-assigned>1</nc:files-assigned> <nc:reference-fileid>923422</nc:reference-fileid> </d:prop> <d:status>HTTP/1.1 200 OK</d:status> </d:propstat> </d:response> … Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | | Merge pull request #37691 from nextcloud/object-store-background-scanJohn Molakvoæ2023-05-114-90/+110
|\ \ \
| * | | repair -1 folder sizes for object store background scanRobin Appelman2023-05-104-90/+110
| |/ / | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / / Make sure to never trigger files hooks on a null pathCôme Chilliet2023-05-041-1/+4
|/ / | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #37943 from nextcloud/fix/fix-getcontent-return-typeArthur Schiwon2023-05-037-11/+13
|\ \ | |/ |/| Fix file_get_content signatures to make it clear it can return false