]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Fix a small bug in bytes2str. It will now also show GBs if appropriate
authorkkalev <kkalev>
Fri, 10 Oct 2003 12:15:18 +0000 (12:15 +0000)
committerkkalev <kkalev>
Fri, 10 Oct 2003 12:15:18 +0000 (12:15 +0000)
Changelog
lib/functions.php3

index 992cfe0927b0a870f70c4a43f3d0e48541efc0b9..8c71ed6ce8441db82c0d0a229aa47fc86aa7a6f5 100644 (file)
--- 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
index 88cd1975d97b1b115815cb07055ad42f5a0cbe60..c0cd1ce4ddb142647be64cd8bb0d67756a8fadbe 100644 (file)
@@ -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);