Commit bcf95f03 authored by Kevin Falcone's avatar Kevin Falcone
Browse files

Merge branch '3.0/search-query-tweak' into 3.0.0-releng

parents 3b5dd0ce 3068ab7c
......@@ -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>
......
......@@ -82,8 +82,12 @@ RT::IR::Config::CheckObsoleteCFSyntax($Format,$location);
RT::IR::Config::CheckObsoleteCFSyntax($Query,$location);
if ( $Type ) {
$BaseQuery ||= RT::IR->Query( Queue => $Queue );
$Query ||= RT::IR->ActiveQuery( Queue => $Queue );
if ( $Query ) {
$BaseQuery ||= RT::IR->Query( Queue => $Queue );
}
else {
$Query = RT::IR->ActiveQuery( Queue => $Queue );
}
}
my $BaseURL = "RTIR/Search/Results.html";
......
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