diff options
author | ivan <ivan> | 2004-02-07 08:24:08 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-02-07 08:24:08 +0000 |
commit | f8022bac348655d360ee107ddec59eae97bb00ab (patch) | |
tree | a03016f82cb8c64ed607334c0e392d1e2d05c061 | |
parent | 025b01bb9a6c4bddb4948a2c278d38201333bac8 (diff) |
add ignore_accounting flag to sqlradius and sqlradius_withdomain exports
-rw-r--r-- | FS/FS/cust_svc.pm | 4 | ||||
-rw-r--r-- | FS/FS/part_export.pm | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index 91874e0d2..e27b273b4 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -368,6 +368,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; @@ -484,6 +486,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 2615e645a..a465804ab 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -685,12 +685,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', |