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 @@ ...@@ -47,7 +47,12 @@
%# END BPS TAGGED BLOCK }}} %# END BPS TAGGED BLOCK }}}
<%INIT> <%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 = RT->Config->Get('WebPath')."/$BaseURL" unless $BaseURL =~ m{^/};
$BaseURL .= ( $BaseURL =~ /\?/ )? '&': '?' unless $BaseURL =~ m{[&?]$}; $BaseURL .= ( $BaseURL =~ /\?/ )? '&': '?' unless $BaseURL =~ m{[&?]$};
......
...@@ -71,7 +71,14 @@ ...@@ -71,7 +71,14 @@
<%INIT> <%INIT>
my $title = loc('Reporting'); 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> </%INIT>
......
...@@ -82,8 +82,12 @@ RT::IR::Config::CheckObsoleteCFSyntax($Format,$location); ...@@ -82,8 +82,12 @@ RT::IR::Config::CheckObsoleteCFSyntax($Format,$location);
RT::IR::Config::CheckObsoleteCFSyntax($Query,$location); RT::IR::Config::CheckObsoleteCFSyntax($Query,$location);
if ( $Type ) { if ( $Type ) {
$BaseQuery ||= RT::IR->Query( Queue => $Queue ); if ( $Query ) {
$Query ||= RT::IR->ActiveQuery( Queue => $Queue ); $BaseQuery ||= RT::IR->Query( Queue => $Queue );
}
else {
$Query = RT::IR->ActiveQuery( Queue => $Queue );
}
} }
my $BaseURL = "RTIR/Search/Results.html"; 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