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>
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>
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>
- 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>
- 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>
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>
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>
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>
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>
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>