diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-11-24 10:25:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-24 10:25:57 +0100 |
commit | 4c99ba4ad3ca0e2c9a7afcbb94fbd52d6a974622 (patch) | |
tree | 41a0a3db8753af1ea5c77dd09a65636b565e16c0 /lib | |
parent | c1857ef203ac2c0f31fc04848ea042e89ef50122 (diff) | |
parent | 7bcd4193b8f58ea36d76d03d672b1b5c92831dc1 (diff) | |
download | nextcloud-server-4c99ba4ad3ca0e2c9a7afcbb94fbd52d6a974622.tar.gz nextcloud-server-4c99ba4ad3ca0e2c9a7afcbb94fbd52d6a974622.zip |
Merge pull request #35335 from nextcloud/stable25-revert-34032-fix-quota-32bit
Revert "[stable25] Fix quota type to int"
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 8 | ||||
-rw-r--r-- | lib/private/legacy/OC_Util.php | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 3b409fd1d04..de42a7bc7fc 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -95,7 +95,7 @@ class OC_Helper { /** * Make a computer file size * @param string $str file size in human readable format - * @return int|false a file size in bytes + * @return float|false a file size in bytes * * Makes 2kB to 2048. * @@ -104,7 +104,7 @@ class OC_Helper { public static function computerFileSize($str) { $str = strtolower($str); if (is_numeric($str)) { - return (int)$str; + return (float)$str; } $bytes_array = [ @@ -131,7 +131,7 @@ class OC_Helper { $bytes = round($bytes); - return (int)$bytes; + return $bytes; } /** @@ -577,7 +577,7 @@ class OC_Helper { /** * Get storage info including all mount points and quota */ - private static function getGlobalStorageInfo(int $quota, IUser $user, IMountPoint $mount): array { + private static function getGlobalStorageInfo(float $quota, IUser $user, IMountPoint $mount): array { $rootInfo = \OC\Files\Filesystem::getFileInfo('', 'ext'); $used = $rootInfo['size']; if ($used < 0) { diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 88cd6baddc5..0130d503a89 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -158,7 +158,7 @@ class OC_Util { * Get the quota of a user * * @param IUser|null $user - * @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes + * @return float|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes */ public static function getUserQuota(?IUser $user) { if (is_null($user)) { |