[Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.17,1.18.2.18
Steve Tonnesen
tonnesen at users.sourceforge.net
Fri Nov 8 21:12:36 CET 2002
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv32397
Modified Files:
Tag: rel-1-2
Search.pm
Log Message:
Hack to allow apostrophe in subject searches
Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.18.2.17
retrieving revision 1.18.2.18
diff -C2 -r1.18.2.17 -r1.18.2.18
*** Search.pm 1 Nov 2002 06:48:33 -0000 1.18.2.17
--- Search.pm 8 Nov 2002 20:12:33 -0000 1.18.2.18
***************
*** 966,972 ****
--- 966,974 ----
my $count=@key;
my $i=1;
+ $key[0]=~s/'/\\'/g;
$query="select distinct(subject) from bibliosubject where( subject like
'$key[0]%' or subject like '% $key[0]%' or subject like '% $key[0]' or subject like '%($key[0])%')";
while ($i<$count){
+ $key[$i]=~s/'/\\'/g;
$query.=" and (subject like '$key[$i]%' or subject like '% $key[$i]%'
or subject like '% $key[$i]'
More information about the Koha-cvs
mailing list