aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_Helper.php
Commit message (Collapse)AuthorAgeFilesLines
* feat(IUser): add `getQuotaBytes` method to get machine readable quotafeat/user-get-quota-bytesFerdinand Thiessen2025-05-221-1/+1
| | | | | | | | | | | Proper replacement for deprecated `OC_Util::getUserQuota`. Also we still use this in some cases we can now replace, moreover it just makes sense to have a machine readable format in the API instead of only the human readable format which is less precise. Alings also with `getQuota` of the quota storage, which already returned the machine readable format. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: deprecate `OC_Helper::isReadOnlyConfigEnabled`chore/depreate-oc-helper-roFerdinand Thiessen2025-05-171-1/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge pull request #52890 from nextcloud/chore/move-stream-copy-implementationFerdinand Thiessen2025-05-171-23/+2
|\ | | | | chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`
| * chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`Ferdinand Thiessen2025-05-161-23/+2
| | | | | | | | | | | | | | | | | | The function was already there but called the legacy version. So moved the implementation and migrated all usages of it. Sadly the interface was slightly different so adjusted it to be compatible with both legacy and the OCP one. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | chore!: remove legacy functions from `OC_Helper` deprecated before v10Ferdinand Thiessen2025-05-161-101/+4
| | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | chore: deprecate OC_Helper::copyrchore/deprecate-ochelper-copyrFerdinand Thiessen2025-05-161-1/+2
|/ | | | | | Inline it into Installer as needed. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: move implementation to non-deprecated OCP\Util from OC_Helperchore/move-impl-utilFerdinand Thiessen2025-05-161-48/+14
| | | | | | | | Only moves the implementation where it was already existing and adds more helpful deprecation messages. This way we can in the future just remove the OC_Helper variants. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge pull request #52812 from nextcloud/chore/oc-helper-rmdirrJohn Molakvoæ2025-05-141-29/+2
|\
| * chore: move implementation from OC legacy to OCP\Fileschore/oc-helper-rmdirrFerdinand Thiessen2025-05-141-29/+2
| | | | | | | | | | | | | | | | | | - move implementation to the OCP variant that called the legacy before - add the missing deprecation notice - add missing parameter to align both signatures - use OCP\Files where this method is still used Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | Merge pull request #52801 from nextcloud/chore/oc-helper-filesizeFerdinand Thiessen2025-05-141-53/+4
|\ \ | | | | | | chore: replace legacy OC_Helper calls with OCP\Util
| * | chore: replace leagcy OC_Helper calls with OCP\Utilchore/oc-helper-filesizeFerdinand Thiessen2025-05-141-53/+4
| |/ | | | | | | | | | | | | | | - Replace legacy calls with OCP\Util - Add missing deprecation notices - Inline implementation in OCP\Util and call it from OC_Helper Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* / chore: deprecate \OC_Helper::canExecutechore/oc-helper-can-execFerdinand Thiessen2025-05-141-0/+1
|/ | | | | | replace this legacy method with just the IBinaryFinder Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: skip caching lastSeenQuotaUsage for remote sharesbug/noid/skip-quote-cache-for-remote-sharesDaniel Kesselberg2025-03-141-2/+9
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add proper deprecation dates where missingFerdinand Thiessen2024-09-201-2/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(Files): Handle getOwner() returning falsefix/storage/get-owner-falseprovokateurin2024-09-171-2/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-10/+10
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* refactor: Migrate some legacy and core functions to `IFilenameValidator`Ferdinand Thiessen2024-07-191-2/+10
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-42/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Fix small psalm errors in legacyCôme Chilliet2024-04-301-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Avoid calling setUserValue on null user idCôme Chilliet2024-03-061-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat: Store last known quota usage for a userCôme Chilliet2024-03-061-0/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* 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>