koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/opac searchoptions.pl,1.1,1.2


From: Waylon Robertson
Subject: [Koha-cvs] CVS: koha/opac searchoptions.pl,1.1,1.2
Date: Wed, 01 Jun 2005 21:36:24 -0700

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

Modified Files:
        searchoptions.pl 
Log Message:
minor bugfix

Index: searchoptions.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/searchoptions.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** searchoptions.pl    2 Jun 2005 00:47:58 -0000       1.1
--- searchoptions.pl    2 Jun 2005 04:36:22 -0000       1.2
***************
*** 34,48 ****
  my $count=0;
  my $newquery='';
! my $subfoundbool=0;
! my $itemtypefoundbool=0;
! my $branchfoundbool=0;
  my $itemtypeslist;
  my $itemtypescatlist;
  my $itemtypessubcatlist;
  my $mediatypeslist;
  $count=0;
  my $dbh=C4::Context->dbh;
  $newquery='op=do_search&nbstatements='.$nbstatements;
! if ($allcategoriesbool eq '' && $category ne ''){
  
      my $sth=$dbh->prepare("select itemtypecodes from categorytable where 
categorycode=?");
--- 34,47 ----
  my $count=0;
  my $newquery='';
! my $keywordfoundbool=0;
  my $itemtypeslist;
  my $itemtypescatlist;
  my $itemtypessubcatlist;
  my $mediatypeslist;
+ 
  $count=0;
  my $dbh=C4::Context->dbh;
  $newquery='op=do_search&nbstatements='.$nbstatements;
! if ($allcategoriesbool == 0 && $category ne ''){
  
      my $sth=$dbh->prepare("select itemtypecodes from categorytable where 
categorycode=?");
***************
*** 51,55 ****
      $sth->finish;
  }
! if ($allmediatypesbool eq '' && @mediatypeswanted ne ''){
      foreach my $mediatype (@mediatypeswanted){
          my $sth=$dbh->prepare("select itemtypecodes from mediatypetable where 
mediatypecode=?");
--- 50,54 ----
      $sth->finish;
  }
! if ($allmediatypesbool == 0 && @mediatypeswanted ne ''){
      foreach my $mediatype (@mediatypeswanted){
          my $sth=$dbh->prepare("select itemtypecodes from mediatypetable where 
mediatypecode=?");
***************
*** 60,64 ****
      }
  }
! if ($allsubcategoriesbool eq '' && @subcategorieswanted ne ''){
      foreach my $subcategory (@subcategorieswanted){
          my $sth=$dbh->prepare("select itemtypecodes from subcategorytable 
where subcategorycode=?");
--- 59,63 ----
      }
  }
! if ($allsubcategoriesbool == 0 && @subcategorieswanted ne ''){
      foreach my $subcategory (@subcategorieswanted){
          my $sth=$dbh->prepare("select itemtypecodes from subcategorytable 
where subcategorycode=?");
***************
*** 69,79 ****
      }
  }
! if ($allitemtypesbool ne ''){
! #warn @itemtypeswanted;
  $itemtypeslist 
.=$itemtypescatlist.$itemtypessubcatlist.$mediatypeslist.$itemtypessearched.join
 ("|", @itemtypeswanted)
  } else {
  $itemtypeslist 
.=$itemtypescatlist.$itemtypessubcatlist.$mediatypeslist.$itemtypessearched
  }
! #warn $itemtypeslist;
  if ($allbranchesbool == 0){
     $brancheslist = join("|",@brancheswanted)
--- 68,78 ----
      }
  }
! if ($allitemtypesbool == 0){
! 
  $itemtypeslist 
.=$itemtypescatlist.$itemtypessubcatlist.$mediatypeslist.$itemtypessearched.join
 ("|", @itemtypeswanted)
  } else {
  $itemtypeslist 
.=$itemtypescatlist.$itemtypessubcatlist.$mediatypeslist.$itemtypessearched
  }
! 
  if ($allbranchesbool == 0){
     $brancheslist = join("|",@brancheswanted)
***************
*** 97,102 ****
           $newquery .= '&value='.$value[$count];
           if ($marclist[$count] eq ''){
!              if ($subfoundbool=0){
!                 $subfoundbool=1;
                  $newquery .=" ".join(" ",@keywords)
               }
--- 96,101 ----
           $newquery .= '&value='.$value[$count];
           if ($marclist[$count] eq ''){
!              if ($keywordfoundbool=0){
!                 $keywordfoundbool=1;
                  $newquery .=" ".join(" ",@keywords)
               }
***************
*** 105,109 ****
  
      }
!     if ($subfoundbool == 0 && $query->param('keysub') ne ''){
          $newquery .= 
'&marclist=&and_or=and&excluding=&operator=contains&value=';
          $newquery .=join(" ",@keywords)
--- 104,108 ----
  
      }
!     if ($keywordfoundbool == 0 && $query->param('keysub') ne ''){
          $newquery .= 
'&marclist=&and_or=and&excluding=&operator=contains&value=';
          $newquery .=join(" ",@keywords)




reply via email to

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