Commit 3068ab7c authored by sunnavy's avatar sunnavy
Browse files

avoid unnecessary parens when $BaseQuery and $Query are not both set

parent 7f997dd6
......@@ -47,7 +47,12 @@
%# END BPS TAGGED BLOCK }}}
<%INIT>
$Query = join ' AND ', map "( $_ )", grep $_, $BaseQuery, $Query;
if ( $BaseQuery && $Query ) {
$Query = join ' AND ', map "( $_ )", $BaseQuery, $Query;
}
else {
$Query ||= $BaseQuery;
}
$BaseURL = RT->Config->Get('WebPath')."/$BaseURL" unless $BaseURL =~ m{^/};
$BaseURL .= ( $BaseURL =~ /\?/ )? '&': '?' unless $BaseURL =~ m{[&?]$};
......
......@@ -71,7 +71,14 @@
<%INIT>
my $title = loc('Reporting');
my $FullQuery = join ' AND ', map "( $_ )", grep $_, $BaseQuery, $Query;
my $FullQuery;
if ( $BaseQuery && $Query ) {
$FullQuery = join ' AND ', map "( $_ )", $BaseQuery, $Query;
}
else {
$FullQuery = $BaseQuery || $Query;
}
</%INIT>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment