Commit Graph

29 Commits (b9906fb21e9f1aadf14e473b8c26a2ec7537fa11)

Author SHA1 Message Date
John Molakvoæ b9906fb21e
feat(files): Quota in navigation
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
1 year ago
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>
1 year ago
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>
2 years ago
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>
2 years ago
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>
2 years ago
Carl Schwan 53169890d6 Fix psalm errors fron the end of the baseline file
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
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>
2 years ago
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>
2 years ago
Robin Appelman bdfef2dbd1
cache storage info in memcache for 5m
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman 5ae6cefd57
dont re-query fileinfo when getting dav quota
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
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>
2 years ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Robin Appelman 7e22487278
fix return value of getStorageInfo when 'quota_include_external_storage' is enabled
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
Christoph Wurst 9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Roeland Jago Douma adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
Unify links to php.net
3 years ago
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
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>
4 years ago
Joas Schilling c1834bac7d
Only use index of mount point when it is there
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
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>
4 years ago
J0WI 68ce17e59b Unify links to php.net
Update all links to https://www.php.net/

Signed-off-by: J0WI <J0WI@users.noreply.github.com>
4 years ago
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>
4 years ago
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Joas Schilling b09620651c
Don't use deprecated getIniWrapper() anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst 1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
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>
4 years ago
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 36b3bc8148
Use php keywords in lowercase
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 1e086064f5
Move legacy classes from PSR0 to PSR4
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago