From 68d0ddbad384e60322de879b784f50608b3823b0 Mon Sep 17 00:00:00 2001 From: kkalev Date: Fri, 10 Oct 2003 12:15:18 +0000 Subject: [PATCH] Fix a small bug in bytes2str. It will now also show GBs if appropriate --- Changelog | 1 + lib/functions.php3 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 992cfe0..8c71ed6 100644 --- a/Changelog +++ b/Changelog @@ -51,6 +51,7 @@ Ver 1.63: * Show correct calculation of the montlhy usage time. * Don't show an account as locked if Dialup-Access does not exist and the mapping corresponds to 'none' attribute * Make clean_radacct and truncate_radacct work correctly +* Fix a small bug in bytes2str. It will now also show GBs if appropriate Ver 1.62: * Remove one sql query from user_admin which was not needed. * Instead of a query like "LIKE 'YYYY-MM-DD%'" use "AcctStopTime >= 'YYYY-MM-DD 00:00:00 AND AcctStopTime diff --git a/lib/functions.php3 b/lib/functions.php3 index 88cd197..c0cd1ce 100644 --- a/lib/functions.php3 +++ b/lib/functions.php3 @@ -89,7 +89,7 @@ function bytes2str($bytes) $bytes=floor($bytes); if ($bytes > 536870912) $str = sprintf("%5.2f GBs", $bytes/1073741824); - if ($bytes > 524288) + else if ($bytes > 524288) $str = sprintf("%5.2f MBs", $bytes/1048576); else $str = sprintf("%5.2f KBs", $bytes/1024); -- 2.39.5