Commit Graph

77 Commits (feat/database/query-result-fetch-associative-fetch-num)

Author SHA1 Message Date
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 +07:00
Robin Appelman fda820a64d
expose MovableMount in public interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-07-28 14:42:09 +07: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 +07:00
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 +07:00
Robin Appelman 9f3dbb699a fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-07 15:50:10 +07:00
Robin Appelman e3bafcc7a8 cache numeric id in mountpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:20:08 +07:00
Robin Appelman 9281359fa4 deduplicate getStorage() logic in Mount\Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:17:40 +07: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 +07: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 +07:00
Daniel Kesselberg f399fd41ec
Fix docblock for return type
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-27 20:05:46 +07: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 +07: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 +07:00
Robin Appelman 99ac46d8f5
allow getting mounts by providers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 14:57:56 +07: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 +07:00
Robin Appelman 19c64cf8b6
setup only relevant mounts when possible
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:46 +07: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 +07:00
Robin Appelman 917c74e214
type fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:16 +07:00
Robin Appelman d81713e5c1
simplify setup of circular SetupManager<->Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:09 +07:00
Robin Appelman 6c1d051ecd
add template annotations to CappedMemoryCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:06 +07: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 +07:00
Robin Appelman 5c0fe93498
move teardown logic to SetupManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:50 +07: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 +07: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 +07: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 +07: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 +07:00
Robin Appelman 8b7c8447a0
move root mount setup to mountproviders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-24 17:21:42 +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
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 +07:00
John Molakvoæ 6ab2feaa54
Implement multibucket shift for ObjectStore
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2021-11-11 15:09:28 +07: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 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Robin Appelman 8a92229485
getStorage can also return null
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-03-24 14:56:40 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +07: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 +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 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07: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 +07:00
Vlastimil Pecinka 1c3abda280
Store user object later in the code
Signed-off-by: Vlastimil Pecinka <pecinka@email.cz>
2019-03-21 21:57:47 +07:00
Robin Appelman f7ae235372
cache OC\Files\Mount\Manager::findIn results
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 19:02:00 +07:00
Robin Appelman f8116ad4cf
use more efficient method to find mountpoint for path
this changes the complexity from the number of mounts to the depth of
the path

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 18:55:52 +07:00
Arthur Schiwon 38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-26 10:45:52 +07:00
Roeland Jago Douma 73e6eea57e
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:50:54 +07:00