From da9fdead92a03a57306e7b31eaa3d39fa77b0b24 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Fri, 21 Dec 2007 13:00:46 -0500 Subject: [PATCH] Rolling back changes made to NZ search elements Signed-off-by: Joshua Ferraro --- C4/Search.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 8fd72052d9..45d5d0598a 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -934,12 +934,7 @@ sub buildQuery { $query_cgi =~ s/^&//; # append the limit to the query - if ($query) { - $query .=" ".$limit; - } - else { - $query = $limit; - } + $query .=" ".$limit; warn "query=$query and limit=$limit" if $DEBUG; @@ -1397,7 +1392,7 @@ sub NZanalyse { # it's a leaf, do the real SQL query and return the result } else { $string =~ s/__X__/"$commacontent"/ if $commacontent; - $string =~ s/-|\.|\?|,|;|!|'|\(|\)|\[|\]|{|}|"|&|\+|\*|\///g; # we must not introduce spaces in place of these chars + $string =~ s/-|\.|\?|,|;|!|'|\(|\)|\[|\]|{|}|"|&|\+|\*|\// /g; warn "leaf:$string" if $DEBUG; # parse the string in in operator/operand/value again $string =~ /(.*)(>=|<=)(.*)/; @@ -1422,7 +1417,6 @@ sub NZanalyse { $left='subject' if $left =~ '^su$'; $left='koha-Auth-Number' if $left =~ '^an$'; $left='keyword' if $left =~ '^kw$'; - $left='itemtype' if $left =~ '^mc$'; # we must allow for limit operators since buildQuery will append $limit to $query if ($operator && $left ne 'keyword' ) { #do a specific search my $dbh = C4::Context->dbh; -- 2.39.5