Carl Schwan
9522dde7a2
feat: Add Folder::getOrCreateFolder api
...
Allow to remove some boilerplate and also this new function is type
safe.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-11-24 11:10:52 +07:00
Ferdinand Thiessen
d6d6747a73
refactor: apply rector rules for PHPUnit 10
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-27 21:56:04 +07:00
Louis Chemineau
bd8a0ec3cf
feat(files): Add appconfig value to disable fixed userfolder permissions optimization
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-09-26 17:43:22 +07:00
Robin Appelman
aa15f9d16d
chore: run rector
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-07-01 22:45:52 +07:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
# Conflicts:
# apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Robin Appelman
3561937816
chore: run rector on tests with new rule
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-12 18:38:29 +07:00
Robin Appelman
29e39c0a2e
chore: run rector on tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-12 18:31:58 +07:00
Joas Schilling
5283e9a5e2
test: Cleanup tests/lib/Files/*
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-15 08:21:22 +07:00
Robin Appelman
1db3d94e1e
test: put parent items into cache in tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-18 16:10:14 +07:00
Côme Chilliet
2bdc97741c
fix(tests): Fix Folder tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-17 19:19:08 +07:00
Côme Chilliet
801733e523
fix: Remove OCP\Files\Storage interface deprecated since version 9
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-16 18:10:48 +07:00
Christoph Wurst
49dd79eabb
refactor: Add void return type to PHPUnit test methods
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 22:32:31 +07:00
Ferdinand Thiessen
cf935e33ae
fix: `OCP\Files\Node\Folder::search` was not setting the owner
...
The owner was not set on the file info causing e.g. webdav searches to never return the known owner.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-11 15:46:44 +07:00
Andy Scherzinger
1f7e2ba599
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +07:00
Robin Appelman
a9ee278ec6
perf: cache path by id to speedup getting nodes by id
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-04 13:57:31 +07:00
Arthur Schiwon
f6ac874dbf
chore: ugly type juggling
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-06-21 16:53:20 +07:00
Julius Härtl
d9c81f56ad
tests: Adapt node related unit tests mocks to required root view
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-04-17 23:46:52 +07:00
Julius Härtl
160bd75d0a
fix: Use proper path when creating node instances
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-04-17 23:46:52 +07:00
Carl Schwan
67551f379f
Filter out old files when trying to get recent files
...
Only do so when asking for less than 100 files and having an offset
equal to 0.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-05 12:53:32 +07:00
Julius Härtl
83b1415906
Only pass parent if paths match
...
As the user folder might be initialized by the root from two levels
down the hierarchy, passing this as a parent only works if the path matches
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-24 22:20:32 +07:00
Julius Härtl
b2d6435737
Avoid extra query for the parent node if we can pass it along
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-24 22:20:32 +07:00
Robin Appelman
151c800397
allow reusing known folder info when getting directory contents
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-06 14:40:34 +07:00
Robin Appelman
754603a04e
dont needlessly resolve path when getting internalPath/storage from Node
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 15:40:24 +07:00
Robin Appelman
1c468129af
adjust tests to new fs setup
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:59 +07:00
Robin Appelman
cfb7923e08
store mountprovider for each mount in the mounts table
...
this enabled more fine grained filesystem setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-23 18:02:33 +07:00
Côme Chilliet
bb9c099e42
Fix FolderTest calls to Mountpoint constructor with wrong type
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:59 +07:00
Robin Appelman
5c2e7c7d28
fix Folder->getById() when a single storage is mounted multiple times
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-07-28 17:21:04 +07:00
Robin Appelman
f938daa6e4
update tests and fix some edge cases around new search
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-14 16:11:36 +07:00
Robin Appelman
0d5f4edc22
adjust tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-04-21 14:09:07 +07:00
Robin Appelman
bfe3712372
handle ordering in folder search
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 16:07:54 +07:00
Robin Appelman
feed42dd6d
folder filtering in sql
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 13:41:00 +07:00
Robin Appelman
de713967c0
cleanup fileinfo creation
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-19 13:35:37 +07:00
Robin Appelman
bd229e7548
handle limit and offset in folder file search
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-18 17:38:31 +07:00
Robin Appelman
50e374c12f
only require user to be set in a query that handles tags
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-18 17:16:28 +07:00
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +07:00
Christoph Wurst
463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
...
Remove unused imports
2020-03-27 17:14:08 +07:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +07:00
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:21:27 +07:00
Christoph Wurst
74936c49ea
Remove unused imports
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +07:00
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +07:00
Morris Jobke
e21f440990
Merge pull request #16502 from nextcloud/bugfix/16474
...
Check the if we can actually access the storage cache for recent files
2019-07-29 16:59:26 +07:00
Roeland Jago Douma
0487144b26
Remove deprecated searchByTag
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-07-26 12:29:19 +07:00
Julius Härtl
3674f6fa2d
Check the if we can actually access the storage cache for recent files
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-07-24 14:01:24 +07:00
Robin Appelman
0ccd970f9d
adjust tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-02-07 15:51:34 +07:00
Robin Appelman
9d9f6903c9
Fix folder path containing leading slash when getting mount root by id
...
This fixes collabora on public link shared groupfolders
Fixes https://github.com/nextcloud/groupfolders/issues/225
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-11-28 15:18:29 +07:00
Roeland Jago Douma
af31fa82e8
Fix test
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-22 12:06:45 +07:00
Morris Jobke
ab36980d20
Use ::class in test mocks of dav app
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-26 10:16:12 +07:00
Vincent Petry
eb5ea0e260
Refactor files node API for more code reuse
...
Signed-off-by: Vincent Petry <pvince81@owncloud.com>
2017-01-11 14:53:42 +07:00
Lukas Reschke
68cebef64c
DI for root.php
...
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-02 23:16:51 +07:00
Robin Appelman
0d842e0550
optimize Folder::getById to use less queries
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:28 +07:00