diff options
author | jeff <jeff> | 2007-04-26 03:11:56 +0000 |
---|---|---|
committer | jeff <jeff> | 2007-04-26 03:11:56 +0000 |
commit | 1ac3ab7d971e7d558045f4bd30961f65e5426be9 (patch) | |
tree | fbb021bf0df6f6b4987c966b717cff42c32243ad | |
parent | 418a85b7ad6613f028f2def95253bbdd68db5876 (diff) |
improve configfile handling (backport)
-rw-r--r-- | FS/FS/UI/bytecount.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/UI/bytecount.pm b/FS/FS/UI/bytecount.pm index 233082b08..c2352da64 100644 --- 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; - 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'; |