]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Format Tera Bytes (add message message179 to awstats-en.txt and one more if to functi... 66/head
authorgdsotirov <gdsotirov@gmail.com>
Wed, 7 Jun 2017 10:47:48 +0000 (13:47 +0300)
committergdsotirov <gdsotirov@gmail.com>
Wed, 7 Jun 2017 10:47:48 +0000 (13:47 +0300)
wwwroot/cgi-bin/awstats.pl
wwwroot/cgi-bin/lang/awstats-en.txt

index 091d6823f3c230f9eefb252e39a5d22a15b8dcb0..5c498475fe2d352c004cc60ee9bacacfdac90012 100755 (executable)
@@ -8104,6 +8104,9 @@ sub Format_Bytes {
        my $fudge = 1;
 
 # Do not use exp/log function to calculate 1024power, function make segfault on some unix/perl versions
+       if ( $bytes >= ( $fudge << 40 ) ) {
+               return sprintf( "%.2f", $bytes / 1099511627776 ) . " $Message[179]";
+       }
        if ( $bytes >= ( $fudge << 30 ) ) {
                return sprintf( "%.2f", $bytes / 1073741824 ) . " $Message[110]";
        }
index 40b9e612f55fa6db84e91622eefa1af5274d1ab4..2de654d5316821689b49c5dee31dcf171f07454a 100644 (file)
@@ -179,4 +179,5 @@ message174=Safari versions
 message175=Chrome versions
 message176=Konqueror versions
 message177=,
-message178=Downloads
\ No newline at end of file
+message178=Downloads
+message179=TB
\ No newline at end of file