From 486c0b075e81be34ba5892a7adccfac7f1ed4ce4 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 4 Nov 2009 17:02:25 +0100 Subject: [PATCH] SQLHelper Enhancement Adding contain as searchtype --- C4/SQLHelper.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/C4/SQLHelper.pm b/C4/SQLHelper.pm index db8b6a4c0e..d2df0a533e 100644 --- a/C4/SQLHelper.pm +++ b/C4/SQLHelper.pm @@ -413,9 +413,20 @@ sub _Process_Operands{ my @localkeys; push @tmpkeys, " $field = ? "; push @values, $operand; + #By default, exact search unless ($searchtype){ return \@tmpkeys,\@values; } + if ($searchtype eq "contain"){ + my $col_field=(index($field,".")>0?substr($field, index($field,".")+1):$field); + if ($field=~/(?0?substr($field, index($field,".")+1):$field); if ($field=~/(?