projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improve configfile handling
[freeside.git]
/
FS
/
FS
/
UI
/
bytecount.pm
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';