X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FBuild.html;h=9594771f0fb82a9ea306dcedd3641d0353a6b43b;hb=0ea23112cfa0d82738b0f08d60d90579721b7524;hp=b200f90505e706b2bf0ba8d45713cc2d663fd3a8;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/rt/share/html/Search/Build.html b/rt/share/html/Search/Build.html index b200f9050..9594771f0 100644 --- a/rt/share/html/Search/Build.html +++ b/rt/share/html/Search/Build.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -190,7 +190,7 @@ my @new_values = (); # 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 '' ); @@ -221,7 +221,7 @@ foreach my $arg ( keys %ARGS ) { 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"; } @@ -234,10 +234,10 @@ foreach my $arg ( keys %ARGS ) { $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 = {