summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2004-02-07 08:24:03 +0000
committerivan <ivan>2004-02-07 08:24:03 +0000
commitaecf44ec9118946eebe551fc7144a1d0dcff8de5 (patch)
tree392f0f0a7362a21e672851689ea231f17b70a238
parentd5005d2e29391ef9f5498626ccec4281f6a850c3 (diff)
add ignore_accounting flag to sqlradius and sqlradius_withdomain exports
-rw-r--r--FS/FS/cust_svc.pm4
-rw-r--r--FS/FS/part_export.pm8
2 files changed, 12 insertions, 0 deletions
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',