Commit Graph

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

Author SHA1 Message Date
Robin Appelman 80b001f82e better caching in storage stats calculations
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-18 11:14:52 +07:00
jld3103 38db3873a2
provisioning_api: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-31 10:29:08 +07:00
John Molakvoæ 7d06dc3474 fix: better error message on missing user files dir
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-05-25 20:31:14 +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
Julius Härtl d515da502f fix: Use proper path for quota fetching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-06 22:46:07 +07:00
Julius Härtl 3287eddbbc fix: Recalculate storage statistics on updating the quota
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-06 22:46:07 +07:00
Côme Chilliet b7d9e43e25
Put back string in $includeMounts as it actually does something
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:32 +07:00
Côme Chilliet d00422b812
Fix computerFileSize when called with a string without unit
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:30 +07:00
Côme Chilliet 7a628c0361
Fix 32bits bigint support in Util/OC_Helper
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:30 +07:00
Côme Chilliet 255f230a87
Fix bigsize support on 32bits in OC_Helper
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:29 +07:00
John Molakvoæ b9906fb21e
feat(files): Quota in navigation
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-01-17 18:30:41 +07:00
Julius Härtl 1746344481 Use display name cache on getStorageInfo
Signed-off-by: Julius Härtl <jus@bitgrid.net>

Adapt test to also run isolated

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-16 17:15:21 +07:00
Vincent Petry 0b09531dc6
Don't use quota cache through user management
When querying the free space through user management APIs, don't use the
cached quota value. The latter is only there to accelerate PROPFINDs.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-11-21 16:24:22 +07:00
Carl Schwan d61efdff6c
Fix quota type to int
Change the quota to int from float, since the quota is a number of bits
and a bits can not be splitted.

Fix #34010

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-12 09:26:04 +07:00
Carl Schwan 9b8ca9ad1f
Move findBinaryFinder and isFunctionEnabled away from OC_Helper
findBinaryFinder is now a service that is still private but with some
minor optimization (remove the hasKey check).

isFunctionEnabled is now in OCP\Util

Both function are still keep but all internal usage in nextcloud/server
were migrated to the new usage, so that we can remove it in 26

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-23 19:44:04 +07:00
Carl Schwan 53169890d6 Fix psalm errors fron the end of the baseline file
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-16 10:58:26 +07:00
Robin Appelman 643ef06efc
don't unjail the path when getting the storage info
the original reason for adding it no longer exist.

This was added with #30985 since then the share source storage was also used, however this was changed with #32076

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-05-11 11:42:13 +07:00
Robin Appelman e50d78e11a
use and cache root storage info if a share can't be resolved
as is a broken share will never be cached

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 15:29:27 +07:00
Robin Appelman bdfef2dbd1
cache storage info in memcache for 5m
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 16:48:01 +07:00
Robin Appelman 5ae6cefd57
dont re-query fileinfo when getting dav quota
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-28 15:57:28 +07:00
Claus-Justus Heine a355410b88
Use the unjailed-path in OC_Helper::getStorageInfo() for files located in SharedStorage.
The current implementation already switches the storage-backend to
$storage->getSourceStorage(). However, it then calls
$rootInfo->getInternalPath() which returns the internal path relative to
the storage where the share is mounted. This is wrong, we need also to
unjail the path. Compare, e.g., with
OCA\Files_Sharing\SharedStorage::file_get/put_contents() for the
"logic".

Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
2022-02-03 10:05:49 +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 7e22487278
fix return value of getStorageInfo when 'quota_include_external_storage' is enabled
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-05-20 13:55:49 +07:00
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +07:00
Roeland Jago Douma adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
Unify links to php.net
2020-12-22 09:53:31 +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
Vincent Petry 2143f2bb82
Set up FS before querying storage info in settings
The personal info section of the personal settings is querying the
storage quota information. For this it requires the FS to be setup which
is not always guaranteed.

This fixes an issue where refreshing the settings page would cause it to
fail after Redis caches are full. It is likely that when Redis cache is
populated, some code path is initializing the FS, so it works so far.
But when the cache is populated, that code path is skipped so the FS is
not guaranteed to be setup...

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2020-11-13 17:06:37 +07:00
Joas Schilling c1834bac7d
Only use index of mount point when it is there
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-21 13:37:56 +07:00
Robin Appelman 0dfdf3ee99
add mount point to quota warning message
makes it more clear to the user what the quota applies to

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-10-04 11:02:32 +07:00
J0WI 68ce17e59b Unify links to php.net
Update all links to https://www.php.net/

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-09-17 17:40:04 +07:00
Robin Appelman c077c15875
show better quota warning for group folders and external storage
instead of showing the generic 'Your storage is full' message, better explain that it's the group folder/external storage that is full

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-08-25 16:05:16 +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
Joas Schilling b09620651c
Don't use deprecated getIniWrapper() anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-20 16:35:38 +07:00
Christoph Wurst 1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +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 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst 36b3bc8148
Use php keywords in lowercase
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 14:04:56 +07:00
Christoph Wurst 85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +07:00
Christoph Wurst 1e086064f5
Move legacy classes from PSR0 to PSR4
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-07 08:48:00 +07:00