aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache/Cache.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: Replace \OC::$server->query with \OCP\Server::get in /libChristoph Wurst2023-07-061-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Drop dead private methods in /libChristoph Wurst2023-06-061-13/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_privateRobin Appelman2023-06-011-1/+1
|\ | | | | Refactors "strpos" calls in lib/private to improve code readability.
| * Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-1/+1
| | | | | | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* | Fix return types in phpdocCôme Chilliet2023-05-151-1/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Get rid of more int casts in file size manipulationsCôme Chilliet2023-05-111-6/+7
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix type hintsRobin Appelman2023-04-041-5/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix unencrypted folder size when no children with unencrypted size set are leftRobin Appelman2023-04-041-1/+24
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix unencrypted_size for folders when scanning the filesystem with ↵Robin Appelman2023-04-041-3/+5
| | | | | | encryption enabled Signed-off-by: Robin Appelman <robin@icewind.nl>
* clear encrypted flag when moving away from encrypted storageRobin Appelman2023-04-011-0/+22
| | | | 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>
* 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-161-8/+39
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Revert "store unencrypted size in the unencrypted_size column"Robin Appelman2022-08-161-30/+5
| | | | | | This reverts commit 8238582e59b7b6ec03318bcf81bf47cce54af320. Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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-271-2/+2
| | | | | | 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>
* store unencrypted size in the unencrypted_size columnRobin Appelman2022-06-021-5/+30
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Adapt more code to migration to LoggerInterfaceCôme Chilliet2022-03-241-2/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Switch logical operatorsacsfer2021-12-031-4/+4
| | | Unless there is a good reason to keep actual ones 👀
* Merge pull request #29281 from vijfhoek/masterJohn Molakvoæ2021-11-011-4/+12
|\
| * Move query outside the loop and reduce chunk size to 1000Sijmen Schoon2021-10-171-10/+12
| | | | | | | | | | | | | | This involved changing CacheQueryBuilder\whereParentIn to take a parameter name, renaming the function accordingly. Signed-off-by: Sijmen Schoon <me@sijmenschoon.nl>
| * Limit parameter count per query in Cache.removeChildrenSijmen Schoon2021-10-171-8/+14
| | | | | | | | Signed-off-by: Sijmen Schoon <me@sijmenschoon.nl>
* | Fix permissions when copying from ObjectStorageCarl Schwan2021-10-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | Make sure that when a user copy a file from a directory they don't have all permissions to a directory where they have more permissions, the permissions are correctly set to the one from the parent taget folder. This was caused by the ObjectStoreStorage::copyFromStorage using the jailed storage and cache entry instead of the unjailed one like other storages (the local one). Steps to reproduce + Use object storage + Create a groupfolder with one group having full permission and another one who can just read files. + With an user who is in the second group, copy a file from the groupfolder to the home folder of this user. + The file in the home folder of the user will be read only and can't be deleted even though it is in their home folder and they are the owner. In oc_filecache, the permissions stored for this file are 1 (READ) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Remove some mentions of ownCloud from our api documentationCarl Schwan2021-07-291-2/+2
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* inject SearchBuilderRobin Appelman2021-06-141-6/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* perform file search in a single queryRobin Appelman2021-06-141-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use searchoperation for storage filter instead of db expressionRobin Appelman2021-06-141-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* rework search api to allow searching on multiple caches at onceRobin Appelman2021-06-141-103/+37
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Catch invalid cache source storage pathJohn Molakvoæ (skjnldsv)2021-03-241-0/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* only require user to be set in a query that handles tagsRobin Appelman2021-03-181-4/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #26013 from nextcloud/object-store-copy-cache-idRobin Appelman2021-03-161-1/+44
|\ | | | | Return the fileid from `copyFromCache` and use it instead of doing an extra query
| * verify that cache entry is validRobin Appelman2021-03-121-0/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * add ICopyFromCache trait to expose existing implementationRobin Appelman2021-03-121-1/+41
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | do cachejail search filtering in sqlRobin Appelman2021-01-261-1/+1
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-081-9/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2020-12-301-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #24715 from nextcloud/bug/noid/limit-get-incomplete-to-1Roeland Jago Douma2020-12-211-1/+2
|\ | | | | Limit getIncomplete query to one row
| * Limit getIncomplete query to one rowDaniel Kesselberg2020-12-151-1/+2
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* code style and dispatchTypedRobin Appelman2020-12-021-2/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* rename cache event to follow new naming standardsRobin Appelman2020-11-261-8/+22
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* extend cache eventsRobin Appelman2020-11-261-3/+15
| | | | | | | | - adds cache remove event - expose storage id in event - emit events during cache move Signed-off-by: Robin Appelman <robin@icewind.nl>
* Empty string is returned as null, but empty string in file cache is the root ↵Joas Schilling2020-11-101-1/+5
| | | | | | and exists Signed-off-by: Joas Schilling <coding@schilljs.com>
* Don't leave cursors open when tests failJoas Schilling2020-11-091-12/+56
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove @suppress SqlInjectionCheckerMorris Jobke2020-09-161-3/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>