diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-11-22 18:03:07 +0100 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2022-11-23 20:43:08 +0100 |
commit | d524329ec3cb51484fa7218e9067a379546e5d20 (patch) | |
tree | 1fb1c2e0d755c1eefdb704cf4c691fca43b448c6 /lib/private/legacy | |
parent | 1a1a810cf2a48824325a3c49d6473cd79e8f9d03 (diff) | |
download | nextcloud-server-d524329ec3cb51484fa7218e9067a379546e5d20.tar.gz nextcloud-server-d524329ec3cb51484fa7218e9067a379546e5d20.zip |
Revert "Fix quota type to int"
This reverts commit d61efdff6c53cb8588b1f54e2b096b336b5163b2.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 6 | ||||
-rw-r--r-- | lib/private/legacy/OC_Util.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 3b409fd1d04..e2bd7de2fba 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; } /** 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)) { |