From: gdsotirov Date: Wed, 7 Jun 2017 10:47:48 +0000 (+0300) Subject: Format Tera Bytes (add message message179 to awstats-en.txt and one more if to functi... X-Git-Tag: AWSTATS_7_8~33^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F66%2Fhead;p=thirdparty%2FAWStats.git Format Tera Bytes (add message message179 to awstats-en.txt and one more if to function Format_Bytes from awstats.pl) --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 091d6823..5c498475 100755 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -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]"; } diff --git a/wwwroot/cgi-bin/lang/awstats-en.txt b/wwwroot/cgi-bin/lang/awstats-en.txt index 40b9e612..2de654d5 100644 --- a/wwwroot/cgi-bin/lang/awstats-en.txt +++ b/wwwroot/cgi-bin/lang/awstats-en.txt @@ -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