%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
<div id="pick-criteria">
- <& Elements/PickCriteria, query => $query{'Query'}, cfqueues => $queues &>
+ <& Elements/PickCriteria, query => $query{'Query'}, queues => $queues &>
<& /Elements/Submit, Label => loc('Add these terms'), SubmitId => 'AddClause', Name => 'AddClause'&>
<& /Elements/Submit, Label => loc('Add these terms and Search'), SubmitId => 'DoSearch', Name => 'DoSearch'&>
</div>
# Try to find if we're adding a clause
foreach my $arg ( keys %ARGS ) {
- next unless $arg =~ m/^ValueOf([\w\.]+|'CF.{.*?}')$/
+ next unless $arg =~ m/^ValueOf([\w\.]+|'\w*CF\.\{.*?\}')$/
&& ( ref $ARGS{$arg} eq "ARRAY"
? grep $_ ne '', @{ $ARGS{$arg} }
: $ARGS{$arg} ne '' );
my ( $op, $value ) = ( $ops[$i], $values[$i] );
next if !defined $value || $value eq '';
- if ( $value eq 'NULL' && $op =~ /=/ ) {
+ if ( $value =~ /^NULL$/i && $op =~ /=/ ) {
if ( $op eq '=' ) {
$op = "IS";
}
$value = "'$value'";
}
- if ($keyword =~ /^'CF\.{(.*)}'/) {
- my $cf = $1;
+ if ($keyword =~ /^'(\w*CF)\.\{(.*)\}'/) {
+ my ($field, $cf) = ($1, $2);
$cf =~ s/(['\\])/\\$1/g;
- $keyword = "'CF.{$cf}'";
+ $keyword = "'$field.{$cf}'";
}
my $clause = {
( $query{'Format'}, $AvailableColumns, $CurrentFormat ) = $m->comp(
'Elements/BuildFormatString',
%ARGS,
- cfqueues => $queues,
+ queues => $queues,
Format => $query{'Format'},
);
SavedChartSearchId => $ARGS{'SavedChartSearchId'},
SavedSearchId => $saved_search{'Id'},
);
- RT::Interface::Web::Redirect(RT->Config->Get('WebPath') . '/Search/Results.html?' . $redir_query_string);
+ RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . 'Search/Results.html?' . $redir_query_string);
$m->abort;
}