From acfb0f48c226a5cba64fbe391677391128a6cbf7 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 17 Oct 2002 14:16:17 +0000 Subject: radacct update: use sqlradius for datasrc, not plandata options (whew) --- httemplate/view/svc_acct.cgi | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'httemplate/view/svc_acct.cgi') diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index e755f87d7..dd242b980 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -146,21 +146,11 @@ print 'RADIUS groups'. print '

'; -if ( $cust_pkg && $cust_pkg->part_pkg->plan eq 'sqlradacct_hour' ) { - - #false laziness w/httemplate/edit/part_pkg... this stuff doesn't really - #belong in plan data - my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); } - split("\n", $cust_pkg->part_pkg->plandata ); +#if ( $cust_pkg && $cust_pkg->part_pkg->plan eq 'sqlradacct_hour' ) { +if ( $cust_pkg && $part_svc->part_export('sqlradius') ) { my $last_bill = $cust_pkg->last_bill; - my $seconds = $svc_acct->seconds_since_sqlradacct( - $last_bill, - time, - $plandata{sql_datasrc}, - $plandata{sql_username}, - $plandata{sql_password}, - ); + my $seconds = $svc_acct->seconds_since_sqlradacct( $last_bill, time ); my $h = int($seconds/3600); my $m = int( ($seconds%3600) / 60 ); my $s = $seconds%60; -- cgit v1.2.1