projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
418a85b
)
improve configfile handling (backport)
author
jeff
<jeff>
Thu, 26 Apr 2007 03:11:56 +0000
(
03:11
+0000)
committer
jeff
<jeff>
Thu, 26 Apr 2007 03:11:56 +0000
(
03:11
+0000)
FS/FS/UI/bytecount.pm
patch
|
blob
|
history
diff --git
a/FS/FS/UI/bytecount.pm
b/FS/FS/UI/bytecount.pm
index
233082b
..
c2352da
100644
(file)
--- a/
FS/FS/UI/bytecount.pm
+++ b/
FS/FS/UI/bytecount.pm
@@
-70,7
+70,8
@@
sub display_bytecount {
return $bc unless ($bc =~ /^(\d+)$/);
my $conf = new FS::Conf;
my $f = new Number::Format;
return $bc unless ($bc =~ /^(\d+)$/);
my $conf = new FS::Conf;
my $f = new Number::Format;
- my $precision = $conf->exists('datavolume-significantdigits')
+ my $precision = ( $conf->exists('datavolume-significantdigits') &&
+ $conf->config('datavolume-significantdigits') =~ /^\s*\d+\s*$/ )
? $conf->config('datavolume-significantdigits')
: 3;
my $unit = $conf->exists('datavolume-forcemegabytes') ? 'M' : 'A';
? $conf->config('datavolume-significantdigits')
: 3;
my $unit = $conf->exists('datavolume-forcemegabytes') ? 'M' : 'A';