summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-03-26 19:00:27 -0700
committerIvan Kohler <ivan@freeside.biz>2013-03-26 19:00:27 -0700
commit8a6bdb6425eac988c19822f301a5849468f85f2e (patch)
tree9d0158df8da6e84b4a9f392dc29b3c8488afc673
parent092d75e50a900003904f8e400d6d102ba5bd16f9 (diff)
fix RADIUS report fallout from adding closed session option, RT#22169, RT#21483
-rw-r--r--FS/FS/part_export/sqlradius.pm7
1 files changed, 5 insertions, 2 deletions
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;