summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorivan <ivan>2002-10-17 14:16:20 +0000
committerivan <ivan>2002-10-17 14:16:20 +0000
commit7480544a715cb25ddb9548a3bb994fa962758323 (patch)
treeaf5e2f675fa6ef4e7aba5a322b552f710498f3f9 /httemplate/view
parenta8eabbd3f6f0b4be3c6108de16f4d87c47148f77 (diff)
radacct update: use sqlradius for datasrc, not plandata options (whew)
Diffstat (limited to 'httemplate/view')
-rwxr-xr-xhttemplate/view/svc_acct.cgi16
1 files changed, 3 insertions, 13 deletions
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index d10b706df..55ee4df0a 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -151,21 +151,11 @@ print '<TR><TD ALIGN="right">RADIUS groups</TD><TD BGCOLOR="#ffffff">'.
print '</TABLE></TD></TR></TABLE><BR><BR>';
-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;