[freeside-commits] branch FREESIDE_3_BRANCH updated. 7f029e082712dceafb9152820746da79a50f2275

Ivan ivan at 420.am
Sat Mar 1 15:34:51 PST 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  7f029e082712dceafb9152820746da79a50f2275 (commit)
      from  3ef95c9cc6b8e9331879fcbf32962e88e3bc2c23 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7f029e082712dceafb9152820746da79a50f2275
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Mar 1 15:34:50 2014 -0800

    fix RADIUS session report for svc_broadband sessions, RT#26461

diff --git a/httemplate/search/sqlradius.cgi b/httemplate/search/sqlradius.cgi
index c8f7932..f7873e7 100644
--- a/httemplate/search/sqlradius.cgi
+++ b/httemplate/search/sqlradius.cgi
@@ -4,11 +4,8 @@
 % # and finally, display the thing
 % ### 
 %
-% foreach my $part_export (
-%   #grep $_->can('usage_sessions'), qsearch( 'part_export' )
-%   qsearch( 'part_export', { 'exporttype' => 'sqlradius' } ),
-%   qsearch( 'part_export', { 'exporttype' => 'sqlradius_withdomain' } )
-% ) {
+% foreach my $part_export ( @part_export ) {
+%
 %   %user2svc = ();
 %
 %   my $efields = tie my %efields, 'Tie::IxHash', %fields;
@@ -27,10 +24,12 @@
 %                            },
 %     );
 %   }
-%
-%
 
-    <% $part_export->exporttype %> to <% $part_export->machine %><BR>
+    <FONT CLASS="fsinnerbox-title">
+      <% $part_export->exportname || $part_export->exporttype |h %>
+      <% $part_export->machine ? ' to '. $part_export->machine : '' |h %>
+    </FONT><BR>
+
     <% include( '/elements/table-grid.html' ) %>
 %   my $bgcolor1 = '#eeeeee';
 %   my $bgcolor2 = '#ffffff';
@@ -150,6 +149,23 @@ if ( $cgi->param('svcnum') =~ /^(\d+)$/ ) {
   $cgi_svc = qsearchs( 'svc_acct', { 'username' => $1 } );
 }
 
+my @part_export = ();
+if ( $cgi_svc ) {
+  my $part_svc = $cgi_svc->cust_svc->part_svc;
+  @part_export = (
+    $part_svc->part_export('sqlradius'),
+    $part_svc->part_export('sqlradius_withdomain'),
+    $part_svc->part_export('broadband_sqlradius'),
+  );
+} else {
+  @part_export = (
+    #grep $_->can('usage_sessions'), qsearch( 'part_export' )
+    qsearch( 'part_export', { 'exporttype' => 'sqlradius' } ),
+    qsearch( 'part_export', { 'exporttype' => 'sqlradius_withdomain' } ),
+    qsearch( 'part_export', { 'exporttype' => 'broadband_sqlradius' } ),
+  );
+}
+
 my $ip = '';
 if ( $cgi->param('ip') =~ /^((\d+\.){3}\d+)$/ ) {
   $ip = $1;

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/sqlradius.cgi |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list