[Koha-cvs] CVS: koha/C4 Search.pm,1.47,1.48

Andrew Arensburger arensb at users.sourceforge.net
Sun Oct 13 08:10:47 CEST 2002


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

Modified Files:
	Search.pm 
Log Message:
Added some FIXME comments.


Index: Search.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Search.pm,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** Search.pm	12 Oct 2002 05:43:03 -0000	1.47
--- Search.pm	13 Oct 2002 06:10:45 -0000	1.48
***************
*** 569,572 ****
--- 569,573 ----
    while ($i < $count){
      $query=$query." and (title like '$key[$i]%' or title like '% $key[$i]%')";
+ 				# FIXME - .=
      $i++;
    }
***************
*** 603,607 ****
      or seriestitle like '% new zealand')"
    }
!   $query=$query."))";
    if ($search->{'class'} ne ''){
      my @temp=split(/\|/,$search->{'class'});
--- 604,608 ----
      or seriestitle like '% new zealand')"
    }
!   $query=$query."))";		# FIXME - .=
    if ($search->{'class'} ne ''){
      my @temp=split(/\|/,$search->{'class'});
***************
*** 890,896 ****
  	   additionalauthors.author like '$key[$i]%' or additionalauthors.author like '% $key[$i]%'
  	   )";
             $i++;
  	 }
! 	 $query=$query.")";
           if ($search->{'title'} ne ''){
  	   my @key=split(' ',$search->{'title'});
--- 891,898 ----
  	   additionalauthors.author like '$key[$i]%' or additionalauthors.author like '% $key[$i]%'
  	   )";
+ 				# FIXME - .= <<EOT
             $i++;
  	 }
! 	 $query=$query.")";	# FIXME - .=
           if ($search->{'title'} ne ''){
  	   my @key=split(' ',$search->{'title'});
***************
*** 900,903 ****
--- 902,906 ----
              while ($i<$count){
  	      $query=$query." and (title like '$key[$i]%' or title like '% $key[$i]%' or title like '% $key[$i]')";
+ 				# FIXME - .=
                $i++;
  	    }
***************
*** 914,918 ****
  	        $query.=" and (unititle like '$key[$i]%' or unititle like '% $key[$i]%')";
              }
! 	    $query=$query."))";
  	   #$query=$query. " and (title like '%$search->{'title'}%'
  	   #or seriestitle like '%$search->{'title'}%')";
--- 917,921 ----
  	        $query.=" and (unititle like '$key[$i]%' or unititle like '% $key[$i]%')";
              }
! 	    $query=$query."))";		# FIXME - .=
  	   #$query=$query. " and (title like '%$search->{'title'}%'
  	   #or seriestitle like '%$search->{'title'}%')";
***************
*** 951,954 ****
--- 954,958 ----
  	    while ($i<$count){
  	      $query=$query." and (title like '$key[$i]%' or title like '% $key[$i]%' or title like '% $key[$i]')";
+ 					# FIXME - .=
  	      $i++;
  	    }
***************
*** 965,969 ****
  	      $query.=" and (unititle like '$key[$i]%' or unititle like '% $key[$i]%')";
  	    }
! 	    $query=$query."))";
  	   }
  	   if ($search->{'abstract'} ne ''){
--- 969,973 ----
  	      $query.=" and (unititle like '$key[$i]%' or unititle like '% $key[$i]%')";
  	    }
! 	    $query=$query."))";		# FIXME - .=
  	   }
  	   if ($search->{'abstract'} ne ''){
***************
*** 1054,1057 ****
--- 1058,1062 ----
          items.biblionumber=biblio.biblionumber
  	and barcode='$search2'";
+ 			# FIXME - .= <<EOT;
        }
        if ($search->{'isbn'} ne ''){
***************
*** 1088,1098 ****
  if ($type ne 'precise' && $type ne 'subject'){
    if ($search->{'author'} ne ''){
!       $query=$query." order by biblio.author,title";
    } else {
!       $query=$query." order by title";
    }
  } else {
    if ($type eq 'subject'){
!       $query=$query." order by subject";
    }
  }
--- 1093,1103 ----
  if ($type ne 'precise' && $type ne 'subject'){
    if ($search->{'author'} ne ''){
!       $query=$query." order by biblio.author,title";	# FIXME - .=
    } else {
!       $query=$query." order by title";			# FIXME - .=
    }
  } else {
    if ($type eq 'subject'){
!       $query=$query." order by subject";		# FIXME - .=
    }
  }
***************
*** 1320,1326 ****
      }
      $dewey=~ s/\.$//;
!     $class = $class.$dewey;
      if ($dewey ne ''){
!       $class = $class.$data->{'subclass'};
      }
   #   $results[$i]="$data->{'title'}\t$data->{'barcode'}\t$datedue\t$data->{'branchname'}\t$data->{'dewey'}";
--- 1325,1331 ----
      }
      $dewey=~ s/\.$//;
!     $class = $class.$dewey;			# FIXME - .=
      if ($dewey ne ''){
!       $class = $class.$data->{'subclass'};	# FIXME - .=
      }
   #   $results[$i]="$data->{'title'}\t$data->{'barcode'}\t$datedue\t$data->{'branchname'}\t$data->{'dewey'}";
***************
*** 1391,1397 ****
        $dewey =~ s/0+$//;
        my $line = $data->{'biblioitemnumber'}."\t".$data->{'itemtype'};
!       $line = $line."\t$data->{'classification'}\t$dewey";
!       $line = $line."\t$data->{'subclass'}\t$data->{isbn}";
!       $line = $line."\t$data->{'volume'}\t$data->{number}";
        my $isth= $dbh->prepare("select * from items where biblioitemnumber = $data->{'biblioitemnumber'}");
        $isth->execute;
--- 1396,1402 ----
        $dewey =~ s/0+$//;
        my $line = $data->{'biblioitemnumber'}."\t".$data->{'itemtype'};
!       $line = $line."\t$data->{'classification'}\t$dewey";	# FIXME - .=
!       $line = $line."\t$data->{'subclass'}\t$data->{isbn}";	# FIXME - .=
!       $line = $line."\t$data->{'volume'}\t$data->{number}";	# FIXME - .=
        my $isth= $dbh->prepare("select * from items where biblioitemnumber = $data->{'biblioitemnumber'}");
        $isth->execute;
***************
*** 1399,1408 ****
          my $iline = $idata->{'barcode'}."[".$idata->{'holdingbranch'}."[";
  	if ($idata->{'notforloan'} == 1) {
! 	  $iline = $iline."NFL ";
  	}
  	if ($idata->{'itemlost'} == 1) {
! 	  $iline = $iline."LOST ";
  	}
!         $line = $line."\t$iline";
        }
        $isth->finish;
--- 1404,1413 ----
          my $iline = $idata->{'barcode'}."[".$idata->{'holdingbranch'}."[";
  	if ($idata->{'notforloan'} == 1) {
! 	  $iline = $iline."NFL ";				# FIXME - .=
  	}
  	if ($idata->{'itemlost'} == 1) {
! 	  $iline = $iline."LOST ";				# FIXME - .=
  	}
!         $line = $line."\t$iline";				# FIXME - .=
        }
        $isth->finish;
***************
*** 1781,1787 ****
--- 1786,1794 ----
      or firstname  like \"$data[$i]%\" or firstname like \"% $data[$i]%\"
      or othernames like \"$data[$i]%\" or othernames like \"% $data[$i]%\")";
+ 			# FIXME - .= <<EOT;
    }
    $query=$query.") or cardnumber = \"$searchstring\"
    order by surname,firstname";
+ 			# FIXME - .= <<EOT;
  #  print $query,"\n";
    my $sth=$dbh->prepare($query);
***************
*** 1990,1994 ****
        $acctlines[$numlines] = $data;
        $numlines++;
!       $total = $total+ $data->{'amountoutstanding'};
     }
     $sth->finish;
--- 1997,2001 ----
        $acctlines[$numlines] = $data;
        $numlines++;
!       $total = $total+ $data->{'amountoutstanding'};	# FIXME - +=
     }
     $sth->finish;





More information about the Koha-cvs mailing list