From 712e83b2ba2b1a4d360630fb4acd9ed5f2cdad07 Mon Sep 17 00:00:00 2001 From: tipaul Date: Fri, 4 May 2007 16:26:16 +0000 Subject: [PATCH] adding short keyword support (ti for title, au for author, some still to do) --- C4/Search.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 2c3bdc479d..87af7a1c38 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1219,11 +1219,11 @@ sub NZanalyse { my $operator = $2; my $right = $3; my $results; + # automatic replace for short operator + $left='title' if $left eq 'ti'; + $left='author' if $left eq 'au'; if ($operator) { #do a specific search - # automatic replace for short operator - $operator='title' if $operator eq 'ti'; - $operator='author' if $operator eq 'au'; my $dbh = C4::Context->dbh; $operator='LIKE' if $operator eq '=' and $right=~ /%/; my $sth = $dbh->prepare("SELECT biblionumbers FROM nozebra WHERE indexname=? AND value $operator ?"); -- 2.39.5