Commit Graph

82 Commits

Author SHA1 Message Date
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +01:00
Robin Appelman
dec880b285
optimize builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-08 15:26:10 +01:00
Robin Appelman
efe68d012c
Merge pull request #39044 from nextcloud/more-empty-mount-checking
Fix root mounts not being setup in some cases
2023-10-24 16:54:05 +02:00
Jonas
7441ce2b11
enh(IMountManager): Add method to get MountPoint from CachedMountInfo
Signed-off-by: Jonas <jonas@freesources.org>
2023-10-23 20:50:24 +02:00
Hamid Dehnavi
ea06cf2f39 Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +03:30
Robin Appelman
5685d68bd3
add more checks to ensure mounts aren't empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-12 16:50:24 +02:00
Robin Appelman
fda820a64d
expose MovableMount in public interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-07-28 14:42:09 +02:00
Faraz Samapoor
e7cc7653b8 Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +03:30
Côme Chilliet
426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +02:00
Robin Appelman
9f3dbb699a fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-07 15:50:10 +01:00
Robin Appelman
e3bafcc7a8 cache numeric id in mountpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:20:08 +01:00
Robin Appelman
9281359fa4 deduplicate getStorage() logic in Mount\Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:17:40 +01:00
Robin Appelman
43589312cc dont delegate Mount\Manager::getByNumericId to getByStorageId
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:16:23 +01:00
Carl Schwan
d5c23dbb9f Move CappedMemoryCache to OCP
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-14 15:54:31 +02:00
Daniel Kesselberg
f399fd41ec
Fix docblock for return type
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-27 20:05:46 +02:00
Côme Chilliet
069477e608
Migrate more classes of lib/private to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 16:52:52 +02:00
Robin Appelman
8b12c75ca2
don't do a full setup for findByStorageId
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 15:40:20 +02:00
Robin Appelman
99ac46d8f5
allow getting mounts by providers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 14:57:56 +02:00
Côme Chilliet
765999f454
Merge pull request #31609 from nextcloud/fix/migrate-away-from-ilogger
Migrate from ILogger to LoggerInterface in lib/private
2022-03-29 09:39:38 +02:00
Robin Appelman
19c64cf8b6
setup only relevant mounts when possible
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:46 +01:00
Côme Chilliet
6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +01:00
Robin Appelman
917c74e214
type fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:16 +01:00
Robin Appelman
d81713e5c1
simplify setup of circular SetupManager<->Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:09 +01:00
Robin Appelman
6c1d051ecd
add template annotations to CappedMemoryCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:06 +01:00
Robin Appelman
22875bf367
move logic to decide what to setup to setupmanager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:03 +01:00
Robin Appelman
5c0fe93498
move teardown logic to SetupManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:50 +01:00
Robin Appelman
15ff65c12f
start moving filesystem setup logic to it's own place
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:47 +01:00
Robin Appelman
7630d7a934
more type hints for ICachedMountInfo and IMountManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:28:11 +01:00
Robin Appelman
8b22a463e9
Merge pull request #31266 from nextcloud/root-setup-mountprovider
move root mount setup to mountproviders
2022-03-04 13:44:05 +00:00
Joas Schilling
88f4e972c5
Don't set up full filesystem to check for certificates
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-26 00:40:12 +01:00
Robin Appelman
8b7c8447a0
move root mount setup to mountproviders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-24 17:21:42 +01: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 +01:00
Robin Appelman
0217949715
only setup part of the filesystem for appdata requests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:21 +01:00
John Molakvoæ
6ab2feaa54
Implement multibucket shift for ObjectStore
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2021-11-11 15:09:28 +01:00
Robin Appelman
8520717b4f
handle case where storage can't be created in getStorageRootId
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-17 14:32:38 +02:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Robin Appelman
8a92229485
getStorage can also return null
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-24 14:56:40 +01:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Robin Appelman
81c5aa9819
set the mount id before calling storage wrapper
this allows the storage wrapper to use the mount id for it's own logic

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-08-31 16:38:47 +02:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Morris Jobke
45428e4948
Add config option to enable multibucket preview distribution
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:31:39 +02:00
Morris Jobke
4fdd38c737
Use fixed preview buckets that are postfixed with -preview-NUMBER
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:19:21 +02:00
Morris Jobke
159f28cd52
Mount the old previews in a separate folder for the multi bucket setup and check in them before using the actual locations
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:19:21 +02:00
Morris Jobke
438ac23e2a
Distribute preview folders in appdata in multibucket setup to multiple buckets
* introduces a new IRootMountProvider to register mount points inside the root storage
* adds a AppdataPreviewObjectStoreStorage to handle the split between preview folders and bucket number

Ref #22033

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:19:20 +02:00
Robin Appelman
70906a359f
ensure home storage is initialized on first setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-09 11:14:45 +02:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
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>
2020-04-10 14:19:56 +02:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02: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 +01:00
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
* 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>
2019-11-22 20:52:10 +01:00