From 8ffd1098ac21e209f4b90e1dde611aa1bd37cf9a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 15 Nov 2023 18:01:19 +0100 Subject: Remove 32bit support int is always the native word size, and we don't really test anything on 32bit OSes anymore. 32bit support already required ugly workarounds in the past for large file sizes and ip2long, so we can finally get rid of those and just put an initial check in install.php. --- inc/util.inc.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'inc/util.inc.php') diff --git a/inc/util.inc.php b/inc/util.inc.php index a5ccdc77..267a3971 100644 --- a/inc/util.inc.php +++ b/inc/util.inc.php @@ -103,11 +103,7 @@ class Util public static function readableFileSize($bytes, int $decimals = -1, int $shift = 0): string { // round doesn't reliably work for large floats, pick workaround depending on OS - if (PHP_INT_SIZE === 4) { - $bytes = sprintf('%.0f', $bytes); - } else { - $bytes = sprintf('%u', $bytes); - } + $bytes = sprintf('%u', $bytes); static $sz = array('Byte', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB'); $factor = (int)floor((strlen($bytes) - 1) / 3); if ($factor === 0) { -- cgit v1.2.3-55-g7522