[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Search.pm
From: |
paul poulain |
Subject: |
[Koha-cvs] koha/C4 Search.pm |
Date: |
Fri, 04 May 2007 16:26:16 +0000 |
CVSROOT: /sources/koha
Module name: koha
Changes by: paul poulain <tipaul> 07/05/04 16:26:16
Modified files:
C4 : Search.pm
Log message:
adding short keyword support (ti for title, au for author, some still
to do)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&r1=1.137&r2=1.138
Patches:
Index: Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -b -r1.137 -r1.138
--- Search.pm 4 May 2007 16:24:08 -0000 1.137
+++ Search.pm 4 May 2007 16:26:16 -0000 1.138
@@ -25,7 +25,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.137 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.138 $' =~ /\d+/g;
shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
};
@@ -1219,11 +1219,11 @@
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 ?");