diff options
Diffstat (limited to 'FS')
| -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',  | 
