summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_Helper.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* better caching in storage stats calculationsRobin Appelman2023-08-181-7/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* provisioning_api: Add OpenAPI specjld31032023-07-311-4/+27
| | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* fix: better error message on missing user files dirJohn Molakvoæ2023-05-251-1/+1
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Use proper path for quota fetchingJulius Härtl2023-03-061-4/+4
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix: Recalculate storage statistics on updating the quotaJulius Härtl2023-03-061-0/+9
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Put back string in $includeMounts as it actually does somethingCôme Chilliet2023-02-071-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix computerFileSize when called with a string without unitCôme Chilliet2023-02-071-0/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix 32bits bigint support in Util/OC_HelperCôme Chilliet2023-02-071-13/+12
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix bigsize support on 32bits in OC_HelperCôme Chilliet2023-02-071-7/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(files): Quota in navigationJohn Molakvoæ2023-01-171-1/+6
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Use display name cache on getStorageInfoJulius Härtl2022-12-161-3/+3
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net> Adapt test to also run isolated Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Don't use quota cache through user managementVincent Petry2022-11-211-4/+8
| | | | | | | 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>
* Fix quota type to intCarl Schwan2022-09-121-3/+3
| | | | | | | | | 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>
* Move findBinaryFinder and isFunctionEnabled away from OC_HelperCarl Schwan2022-08-231-36/+8
| | | | | | | | | | | | 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>
* Fix psalm errors fron the end of the baseline fileCarl Schwan2022-05-161-5/+5
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* don't unjail the path when getting the storage infoRobin Appelman2022-05-111-4/+1
| | | | | | | | 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>
* use and cache root storage info if a share can't be resolvedRobin Appelman2022-04-221-2/+14
| | | | | | as is a broken share will never be cached Signed-off-by: Robin Appelman <robin@icewind.nl>
* cache storage info in memcache for 5mRobin Appelman2022-04-211-1/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* dont re-query fileinfo when getting dav quotaRobin Appelman2022-03-281-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use the unjailed-path in OC_Helper::getStorageInfo() for files located in ↵Claus-Justus Heine2022-02-031-1/+4
| | | | | | | | | | | | | | 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>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* fix return value of getStorageInfo when 'quota_include_external_storage' is ↵Robin Appelman2021-05-201-6/+15
| | | | | | enabled Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headersChristoph Wurst2020-12-301-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22916 from J0WI/unifiy-links-to-php.netRoeland Jago Douma2020-12-221-3/+3
|\ | | | | Unify links to php.net
| * Unify links to php.netJ0WI2020-09-171-3/+3
| | | | | | | | | | | | Update all links to https://www.php.net/ Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Set up FS before querying storage info in settingsVincent Petry2020-11-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Only use index of mount point when it is thereJoas Schilling2020-10-211-1/+5
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | add mount point to quota warning messageRobin Appelman2020-10-041-1/+3
|/ | | | | | makes it more clear to the user what the quota applies to Signed-off-by: Robin Appelman <robin@icewind.nl>
* show better quota warning for group folders and external storageRobin Appelman2020-08-251-1/+3
| | | | | | 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>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Don't use deprecated getIniWrapper() anymoreJoas Schilling2020-08-201-3/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-101-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-3/+4
| | | | | | | | | | | | | | | 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>
* Use elseif instead of else ifChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use php keywords in lowercaseChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix multiline commentsChristoph Wurst2020-04-081-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Move legacy classes from PSR0 to PSR4Christoph Wurst2020-04-071-0/+601
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>