From a03ed6cb4739d6276b342d0d606abbb18b95b6a0 Mon Sep 17 00:00:00 2001 From: EV-soft Date: Thu, 27 May 2021 13:37:49 +0200 Subject: [PATCH] Fix sorting column size and correct appearance --- tinyfilemanager.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tinyfilemanager.php b/tinyfilemanager.php index a7c5ec6..a183f5c 100644 --- a/tinyfilemanager.php +++ b/tinyfilemanager.php @@ -1969,8 +1969,8 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
' . readlink($path . '/' . $f) . '' : '') ?>
- "> - + + a-'.str_pad($filesize_raw, 18, "0", STR_PAD_LEFT).''. $filesize; ?> @@ -2031,8 +2031,8 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white ' . readlink($path . '/' . $f) . '' : '') ?> - "> - + + b-'.str_pad($filesize_raw, 18, "0", STR_PAD_LEFT).''. $filesize; ?> @@ -2500,9 +2500,9 @@ function fm_get_size($file) function fm_get_filesize($size) { $size = (float) $size; - $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); + $units = array(' B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); $power = $size > 0 ? floor(log($size, 1024)) : 0; - return sprintf('%s %s', round($size / pow(1024, $power), 2), $units[$power]); + return sprintf('%s %s', number_format(round($size / pow(1024, $power), 2),2), $units[$power]); } /**