From: ivan Date: Sat, 7 Feb 2004 08:24:03 +0000 (+0000) Subject: add ignore_accounting flag to sqlradius and sqlradius_withdomain exports X-Git-Tag: NET_WHOIS_RAW_0_31~147 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=aecf44ec9118946eebe551fc7144a1d0dcff8de5 add ignore_accounting flag to sqlradius and sqlradius_withdomain exports --- diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index ce2b969f9..b74cfd685 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -367,6 +367,8 @@ sub seconds_since_sqlradacct { my $seconds = 0; foreach my $part_export ( @part_export ) { + next if $part_export->option('ignore_accounting'); + my $dbh = DBI->connect( map { $part_export->option($_) } qw(datasrc username password) ) or die "can't connect to sqlradius database: ". $DBI::errstr; @@ -483,6 +485,8 @@ sub attribute_since_sqlradacct { foreach my $part_export ( @part_export ) { + next if $part_export->option('ignore_accounting'); + my $dbh = DBI->connect( map { $part_export->option($_) } qw(datasrc username password) ) or die "can't connect to sqlradius database: ". $DBI::errstr; diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index a27213773..16f91eb6e 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -698,12 +698,20 @@ tie my %sqlradius_options, 'Tie::IxHash', 'datasrc' => { label=>'DBI data source ' }, 'username' => { label=>'Database username' }, 'password' => { label=>'Database password' }, + 'ignore_accounting' => { + type => 'checkbox', + label=>'Ignore accounting records from this database' + }, ; tie my %sqlradius_withdomain_options, 'Tie::IxHash', 'datasrc' => { label=>'DBI data source ' }, 'username' => { label=>'Database username' }, 'password' => { label=>'Database password' }, + 'ignore_accounting' => { + type => 'checkbox', + label=>'Ignore accounting records from this database' + }, ; tie my %cyrus_options, 'Tie::IxHash',