From 101b1f0eafe7721e100974453e42861a01de0942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 11 Mar 2025 11:53:26 +0100 Subject: [PATCH] chore: cleanup human_file_size usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/private/Template/functions.php | 7 ++++--- lib/public/Template.php | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/private/Template/functions.php b/lib/private/Template/functions.php index 9c7abdb9eb4..4354d0d8fce 100644 --- a/lib/private/Template/functions.php +++ b/lib/private/Template/functions.php @@ -238,14 +238,15 @@ function publicPreview_icon($path, $token) { } /** - * make OC_Helper::humanFileSize available as a simple function + * make Util::humanFileSize available as a simple function * @param int $bytes size in bytes * @return string size as string + * @deprecated use Util::humanFileSize instead * - * For further information have a look at OC_Helper::humanFileSize + * For further information have a look at Util::humanFileSize */ function human_file_size($bytes) { - return OC_Helper::humanFileSize($bytes); + return Util::humanFileSize($bytes); } /** diff --git a/lib/public/Template.php b/lib/public/Template.php index 1dc6deecf0f..20783d31cb6 100644 --- a/lib/public/Template.php +++ b/lib/public/Template.php @@ -81,10 +81,10 @@ class Template extends \OC_Template { * @param int $bytes in bytes * @return string size as string * @since 8.0.0 - * @deprecated 32.0.0 Use the function directly instead + * @deprecated 32.0.0 Use \OCP\Util::humanFileSize instead */ public static function human_file_size($bytes) { - return \human_file_size($bytes); + return Util::humanFileSize($bytes); } /**