adding short keyword support (ti for title, au for author, some still to do)

This commit is contained in:
tipaul 2007-05-04 16:26:16 +00:00
parent e1d907c688
commit 712e83b2ba
1 changed files with 3 additions and 3 deletions

View File

@ -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 ?");