koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.17,1.18


From: Joshua Ferraro
Subject: [Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.17,1.18
Date: Fri, 11 Jun 2004 07:01:46 -0700

Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2012

Modified Files:
        SearchMarc.pm 
Log Message:
Fixes problems with searching using terms that contain ' and , by
stripping them out and replacing with a space ... line 115


Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** SearchMarc.pm       3 Jun 2004 10:06:27 -0000       1.17
--- SearchMarc.pm       11 Jun 2004 14:01:28 -0000      1.18
***************
*** 96,99 ****
--- 96,103 ----
        #               (m1.subfieldvalue like "Des%" and m2.subfieldvalue like 
"27%")
  
+       # last minute stripping out of stuff
+       # doesn't work @$value =~ s/\'/ /;
+       # @$value = map { $_ =~ s/\'/ /g } @$value;
+       
        # "Normal" statements
        my @normal_tags = ();
***************
*** 108,111 ****
--- 112,122 ----
        my $any_not = 0;
        $orderby = "biblio.title" unless $orderby;
+       
+       #last minute stripping out of ' and ,
+       foreach $_ (@$value) {
+       $_=~ s/\'/ /g;
+       $_=~ s/\,/ /g;
+       }
+       
        for(my $i = 0 ; $i <= $#{$value} ; $i++)
        {
***************
*** 165,169 ****
        if ($sql_where2) {
                $sth = $dbh->prepare("select distinct m1.bibid from 
biblio,biblioitems,marc_biblio,$sql_tables where 
biblio.biblionumber=marc_biblio.biblionumber and 
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and 
$sql_where2 and ($sql_where1) order by $orderby");
!               warn "Q2 : select distinct m1.bibid from 
biblio,biblioitems,marc_biblio,$sql_tables where 
biblio.biblionumber=marc_biblio.biblionumber and 
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and 
$sql_where2 and ($sql_where1) order by $orderby";
        } else {
                $sth = $dbh->prepare("select distinct m1.bibid from 
biblio,biblioitems,marc_biblio,$sql_tables where 
biblio.biblionumber=marc_biblio.biblionumber and 
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and 
$sql_where1 order by $orderby");
--- 176,180 ----
        if ($sql_where2) {
                $sth = $dbh->prepare("select distinct m1.bibid from 
biblio,biblioitems,marc_biblio,$sql_tables where 
biblio.biblionumber=marc_biblio.biblionumber and 
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and 
$sql_where2 and ($sql_where1) order by $orderby");
!               warn "Q2 : select distinct m1.bibid from 
biblio,biblioitems,marc_biblio,$sql_tables where 
biblio.biblionumber=marc_biblio.biblionumber and 
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and 
$sql_where2 and ($sql_where1) order by $orderby term is  @$value";
        } else {
                $sth = $dbh->prepare("select distinct m1.bibid from 
biblio,biblioitems,marc_biblio,$sql_tables where 
biblio.biblionumber=marc_biblio.biblionumber and 
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and 
$sql_where1 order by $orderby");




reply via email to

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