[freeside-commits] freeside/FS/FS/UI bytecount.pm,1.1.2.2,1.1.2.3

Jeff Finucane,420,, jeff at wavetail.420.am
Wed Apr 25 20:11:58 PDT 2007


Update of /home/cvs/cvsroot/freeside/FS/FS/UI
In directory wavetail:/tmp/cvs-serv10089

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	bytecount.pm 
Log Message:
improve configfile handling (backport)

Index: bytecount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/UI/bytecount.pm,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- bytecount.pm	19 Apr 2007 23:38:33 -0000	1.1.2.2
+++ bytecount.pm	26 Apr 2007 03:11:56 -0000	1.1.2.3
@@ -70,7 +70,8 @@
   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';



More information about the freeside-commits mailing list