summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2009-03-15 10:30:26 +0000
committerivan <ivan>2009-03-15 10:30:26 +0000
commitdc24b4b7e2e41dbb3039e9ce367b018fef299ade (patch)
tree7b0e400a57153c68ba05d96dbc5a73dfa4346366
parent5cf0508a1ec3dafaeef8a4bd206ef5e5b51235c8 (diff)
we're not a disk drive manufacturer, don't use halfass base-10 megs/gigs
-rw-r--r--FS/FS/UI/bytecount.pm4
-rw-r--r--httemplate/edit/prepay_credit.cgi12
2 files changed, 8 insertions, 8 deletions
diff --git a/FS/FS/UI/bytecount.pm b/FS/FS/UI/bytecount.pm
index 0891e6d68..0ddc7545c 100644
--- a/FS/FS/UI/bytecount.pm
+++ b/FS/FS/UI/bytecount.pm
@@ -32,9 +32,9 @@ sub bytecount_unexact {
return("$bc bytes")
if ($bc < 1000);
return(sprintf("%.2f Kbytes", $bc/1024))
- if ($bc < 1000000);
+ if ($bc < 1048576);
return(sprintf("%.2f Mbytes", $bc/1048576))
- if ($bc < 1000000000);
+ if ($bc < 1073741824);
return(sprintf("%.2f Gbytes", $bc/1073741824));
}
diff --git a/httemplate/edit/prepay_credit.cgi b/httemplate/edit/prepay_credit.cgi
index 9e1c30ba6..ed404b7cd 100644
--- a/httemplate/edit/prepay_credit.cgi
+++ b/httemplate/edit/prepay_credit.cgi
@@ -97,14 +97,14 @@ tie my %multiplier, 'Tie::IxHash',
tie my %bytemultiplier, 'Tie::IxHash',
1 => 'bytes',
- 1000 => 'Kbytes',
- 1000000 => 'Mbytes',
- 1000000000 => 'Gbytes',
+ 1024 => 'Kbytes',
+ 1048576 => 'Mbytes',
+ 1073741824 => 'Gbytes',
;
$cgi->param('multiplier', '60') unless $cgi->param('multiplier');
-$cgi->param('upmultiplier', '1000000') unless $cgi->param('upmultiplier');
-$cgi->param('downmultiplier', '1000000') unless $cgi->param('downmultiplier');
-$cgi->param('totalmultiplier','1000000') unless $cgi->param('totalmultiplier');
+$cgi->param('upmultiplier', '1048576') unless $cgi->param('upmultiplier');
+$cgi->param('downmultiplier', '1048576') unless $cgi->param('downmultiplier');
+$cgi->param('totalmultiplier','1048576') unless $cgi->param('totalmultiplier');
</%init>