From: Ivan Kohler Date: Wed, 27 Mar 2013 02:00:27 +0000 (-0700) Subject: fix RADIUS report fallout from adding closed session option, RT#22169, RT#21483 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=8a6bdb6425eac988c19822f301a5849468f85f2e fix RADIUS report fallout from adding closed session option, RT#22169, RT#21483 --- diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm index db66c39c0..833dd9a1d 100644 --- a/FS/FS/part_export/sqlradius.pm +++ b/FS/FS/part_export/sqlradius.pm @@ -741,8 +741,11 @@ sub usage_sessions { } } if ( $opt->{session_status} ne 'closed' ) { - $acctstoptime = "( $acctstoptime ) OR " if $acctstoptime; - $acctstoptime .= 'AcctStopTime IS NULL'; + if ( $acctstoptime ) { + $acctstoptime = "( ( $acctstoptime ) OR AcctStopTime IS NULL )"; + } else { + $acctstoptime = 'AcctStopTime IS NULL'; + } } push @where, $acctstoptime;