X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fsqlradius.pm;h=4f67ac6c3a44c3dd1bfdc2e623d2b29b791b4208;hb=63a268637b2d51a8766412617724b9436439deb6;hp=fca6e09fe4510308cecd40eac374a95df538cfb8;hpb=2641816698538bbe52d56365266a66e292ce08f1;p=freeside.git diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm index fca6e09fe..4f67ac6c3 100644 --- a/FS/FS/part_export/sqlradius.pm +++ b/FS/FS/part_export/sqlradius.pm @@ -1,6 +1,7 @@ package FS::part_export::sqlradius; -use vars qw(@ISA $DEBUG %info %options $notes1 $notes2); +use vars qw(@ISA @EXPORT_OK $DEBUG %info %options $notes1 $notes2); +use Exporter; use Tie::IxHash; use FS::Record qw( dbh qsearch qsearchs str2time_sql ); use FS::part_export; @@ -9,6 +10,7 @@ use FS::export_svc; use Carp qw( cluck ); @ISA = qw(FS::part_export); +@EXPORT_OK = qw( sqlradius_connect ); $DEBUG = 0; @@ -32,7 +34,7 @@ tie %options, 'Tie::IxHash', type => 'checkbox', label => 'Show the Called-Station-ID on session reports', }, - 'overlimit_groups' => { label => 'Radius groups to assign to svc_acct which has exceeded its bandwidth or time limit', } , + 'overlimit_groups' => { label => 'Radius groups to assign to svc_acct which has exceeded its bandwidth or time limit (if not overridden by overlimit_groups global or per-agent config)', } , 'groups_susp_reason' => { label => 'Radius group mapping to reason (via template user) (svcnum|username|username@domain reasonnum|reason)', type => 'textarea', @@ -577,7 +579,7 @@ sub usage_sessions { my $opt = {}; my($start, $end, $svc_acct, $ip, $prefix) = ( '', '', '', '', ''); if ( ref($_[0]) ) { - my $opt = shift; + $opt = shift; $start = $opt->{stoptime_start}; $end = $opt->{stoptime_end}; $svc_acct = $opt->{svc_acct}; @@ -611,7 +613,7 @@ sub usage_sessions { ); my @param = (); - my @where = ''; + my @where = (); if ( $svc_acct ) { my $username = $self->export_username($svc_acct); @@ -672,7 +674,7 @@ sub usage_sessions { =cut -sub update_svc_acct { +sub update_svc { my $self = shift; my $conf = new FS::Conf; @@ -706,7 +708,7 @@ sub update_svc_acct { $UserName = lc($UserName) unless $conf->exists('username-uppercase'); - my %search = ( 'username' => $UserName ); + #my %search = ( 'username' => $UserName ); my $extra_sql = ''; if ( ref($self) =~ /withdomain/ ) { #well... @@ -799,7 +801,7 @@ sub all_sqlradius { my @part_export = (); push @part_export, qsearch('part_export', { 'exporttype' => $_ } ) - foreach qw(sqlradius sqlradius_withdomain radiator); + foreach qw( sqlradius sqlradius_withdomain radiator phone_sqlradius ); @part_export; }