aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
Commit message (Collapse)AuthorAgeFilesLines
...
| * | refactor: remove SystemTag logic from Folder into QuerySearchHelperArthur Schiwon2023-05-091-0/+39
| | | | | | | | | | | | | | | | | | | | | - 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-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-092-22/+58
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* / repair -1 folder sizes for object store background scanRobin Appelman2023-05-101-7/+10
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #36857 from nextcloud/scan-repair-unencrypted-sizeRobin Appelman2023-04-245-39/+50
|\ | | | | fix unencrypted_size for folders when scanning the filesystem with encryption enabled
| * fix type hintsRobin Appelman2023-04-044-8/+6
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix unencrypted folder size when no children with unencrypted size set are leftRobin Appelman2023-04-042-31/+26
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix unencrypted_size for files when scanningRobin Appelman2023-04-041-0/+8
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix unencrypted_size for folders when scanning the filesystem with ↵Robin Appelman2023-04-042-6/+16
| | | | | | | | | | | | encryption enabled Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #37820 from nextcloud/parent-storage-mtime-ignore-errorRobin Appelman2023-04-211-1/+13
|\ \ | | | | | | ignore errors while trying to update parent storage_mtime
| * | ignore errors while trying to update parent storage_mtimeRobin Appelman2023-04-201-1/+13
| | | | | | | | | | | | | | | | | | in the worst case this should only cause an extra rescan later Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Merge branch 'master' into enh/type-iconfig-getter-callsCôme Chilliet2023-04-201-4/+10
|\| | | | | | | | Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
| * | improve handling of files we can't access in the scannerRobin Appelman2023-04-051-5/+11
| |/ | | | | | | | | | | | | | | instead of erroring, remove the items from the cache. this situation can be triggered if a user has access to a file but looses it afterwards Signed-off-by: Robin Appelman <robin@icewind.nl>
* / Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-2/+2
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix inherited parameter namesjld31032023-04-031-4/+4
| | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* clear encrypted flag when moving away from encrypted storageRobin Appelman2023-04-012-0/+31
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #34773 from ↵Côme Chilliet2023-03-211-1/+19
|\ | | | | | | | | nextcloud/artonge/feat/dispatch_entry_removed_event_for_all_entries Dispatch event for all removed entries
| * Dispatch event for all remove entryLouis Chemineau2023-01-311-1/+19
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Make sure name and path are stringsJoas Schilling2023-02-021-0/+2
| | | | | | | | | | | | | | Otherwise Oracle returns NULL for empty strings and PHP 8.2 throws on null in string functions like trim() and md5() Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Try fixing OracleJoas Schilling2023-02-021-1/+6
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* composer run cs:fixCôme Chilliet2023-01-203-4/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Switch logical operatorsGit'Fellow2023-01-111-18/+11
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Merge pull request #34924 from nextcloud/cache-jail-path-prefixVincent Petry2022-12-161-1/+1
|\ | | | | escape path prefix when doing cache jail search
| * escape path prefix when doing cache jail searchRobin Appelman2022-11-021-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Fix Executing a query: SQLSTATE[42000]Andy Xheli2022-11-291-1/+1
|/ | | | | | | Signed-off-by: Andy Xheli <axheli@axtsolutions.com> Fix https://github.com/nextcloud/server/issues/32007#issuecomment-1329405245 Signed-off-by: Andy Xheli <axheli@axtsolutions.com>
* Merge pull request #34579 from nextcloud/unencrypted-size-nullVincent Petry2022-10-211-1/+1
|\ | | | | fix null error in getUnencryptedSize
| * fix null error in getUnencryptedSizeRobin Appelman2022-10-131-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Fix various other small psalm issuesCarl Schwan2022-10-171-1/+1
|/ | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix unencrypted size calculation for files created before the Encryption ↵raul2022-10-031-1/+1
| | | | | | storage is enabled Signed-off-by: raul <raul@nextcloud.com>
* Fix: Prevent deadlocks during mtime/size/etag propagationraul2022-10-031-17/+29
| | | | Signed-off-by: raul <raul@nextcloud.com>
* directly build the search filter for shared storage instead of setting up ↵Robin Appelman2022-08-171-2/+6
| | | | | | the source cache Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #32943 from ↵Vincent Petry2022-08-172-30/+40
|\ | | | | | | | | nextcloud/unencrypted-size-revert-interface-changes Revert interface changes from "store unencrypted size in the unencrypted_size column"
| * fix updating size when folder is emptyRobin Appelman2022-08-161-13/+17
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * store unencrypted size in the unencrypted_size columnRobin Appelman2022-08-163-8/+62
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * Revert "store unencrypted size in the unencrypted_size column"Robin Appelman2022-08-163-53/+5
| | | | | | | | | | | | This reverts commit 8238582e59b7b6ec03318bcf81bf47cce54af320. Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #33550 from nextcloud/jail-search-postVincent Petry2022-08-171-5/+7
|\ \ | | | | | | optimize search post-processing for jail wrapper
| * | optimize search post-processing for jail wrapperRobin Appelman2022-08-161-5/+7
| |/ | | | | | | | | | | don't both asking the wrapped cache if we know it's not in our jail anyway Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #33551 from nextcloud/scanner-dont-update-same-sizeVincent Petry2022-08-171-3/+10
|\ \ | | | | | | don't update the folder size if we know it hasn't changed
| * | don't update the folder size if we know it hasn't changedRobin Appelman2022-08-161-3/+10
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / fixed the cache searchBuilder negative mapDavid2022-08-161-1/+1
|/ | | Signed-off-by: David <37280718+yeyulantu@users.noreply.github.com>
* Document all getIncomplete implementations as returning string|falseCôme Chilliet2022-08-022-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix dynamic property creations in test filesCôme Chilliet2022-08-011-1/+1
| | | | | | This fixes warnings in PHP 8.2 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix typos in lib/private subdirectoryluz paz2022-07-276-9/+9
| | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* Check whether entry is of type ICacheEntry in Cache->remove()Jonas2022-06-291-1/+1
| | | | | | | | | | | | | In some scenarios (file not in cache, but partial data of it in the object), Cache->get() might return an array, which leads to errors like "Call to a member function getId() on array". So check whether the returned entry is of type ICacheEntry before doing operations on it in Cache->remove(). Fixes: #33023 Signed-off-by: Jonas <jonas@freesources.org>
* Search without join on filecache_extendedCarl Schwan2022-06-232-5/+9
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* store unencrypted size in the unencrypted_size columnRobin Appelman2022-06-024-6/+54
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Files: Extend search to also cover tagsMarcel Klehr2022-05-173-7/+22
| | | | | | fixes #326 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* Migrate more classes of lib/private to LoggerInterfaceCôme Chilliet2022-04-261-9/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* tell mysql to ignore the sort index for search queriesRobin Appelman2022-04-221-0/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #31713 from nextcloud/fed-performanceRobin Appelman2022-04-072-3/+8
|\ | | | | Federated share performance improvements