koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.9,1.18.2.10


From: Chris Cormack
Subject: [Koha-cvs] CVS: koha/C4 Search.pm,1.18.2.9,1.18.2.10
Date: Wed, 11 Sep 2002 21:37:30 -0700

Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv31319/C4

Modified Files:
      Tag: rel-1-2
        Search.pm 
Log Message:
quick fix to throw away searches with less than 3 characters in the search
term


Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.18.2.9
retrieving revision 1.18.2.10
diff -C2 -r1.18.2.9 -r1.18.2.10
*** Search.pm   19 Aug 2002 06:20:48 -0000      1.18.2.9
--- Search.pm   12 Sep 2002 04:37:27 -0000      1.18.2.10
***************
*** 102,108 ****
    my ($env,$type,$search,$num,$offset)address@hidden;
    my $dbh = C4Connect();
! #  foreach my $key (%$search){
! #    $search->{$key}=$dbh->quote($search->{$key});
! #  }
    my ($count,@results);
  #  print STDERR "Doing a search $search->{'itemnumber'} $search->{'isbn'}\n";
--- 102,110 ----
    my ($env,$type,$search,$num,$offset)address@hidden;
    my $dbh = C4Connect();
!   foreach my $key (%$search){
!     if (length($search->{$key}) < 3){
!        undef ($search->{$key});
!     }
!   }
    my ($count,@results);
  #  print STDERR "Doing a search $search->{'itemnumber'} $search->{'isbn'}\n";
***************
*** 171,175 ****
    my $dbh = &C4Connect;
    $search->{'keyword'}=~ s/ +$//;
!   $search->{'keyword'}=~ s/'/\\'/;
    my @key=split(' ',$search->{'keyword'});
    my address@hidden;
--- 173,177 ----
    my $dbh = &C4Connect;
    $search->{'keyword'}=~ s/ +$//;
!   $search->{'keyword'}=~ s/'/\\'/g;
    my @key=split(' ',$search->{'keyword'});
    my address@hidden;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]