[Koha-cvs] CVS: koha/C4 Biblio.pm,1.108,1.109 SearchMarc.pm,1.32,1.33

Paul POULAIN tipaul at users.sourceforge.net
Wed Nov 24 16:58:48 CET 2004


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

Modified Files:
	Biblio.pm SearchMarc.pm 
Log Message:
* critical fix for acquisition (see RC3 release notes)
* critical fix for duplicate finder

Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -r1.108 -r1.109
*** Biblio.pm	19 Nov 2004 19:41:22 -0000	1.108
--- Biblio.pm	24 Nov 2004 15:58:31 -0000	1.109
***************
*** 1800,1808 ****
      #  my $dbh=C4Connect;
      $item->{'itemnum'} = $item->{'itemnumber'} unless $item->{'itemnum'};
!     my $query = "update items set  barcode=?,itemnotes=?,itemcallnumber=?,notforloan=? where itemnumber=?";
      my @bind = (
          $item->{'barcode'},        $item->{'notes'},
          $item->{'itemcallnumber'}, $item->{'notforloan'},
!         $item->{'itemnum'}
      );
      if ( $item->{'barcode'} eq '' ) {
--- 1800,1808 ----
      #  my $dbh=C4Connect;
      $item->{'itemnum'} = $item->{'itemnumber'} unless $item->{'itemnum'};
!     my $query = "update items set  barcode=?,itemnotes=?,itemcallnumber=?,notforloan=?,location=? where itemnumber=?";
      my @bind = (
          $item->{'barcode'},        $item->{'notes'},
          $item->{'itemcallnumber'}, $item->{'notforloan'},
!         $item->{'location'},	   $item->{'itemnum'}
      );
      if ( $item->{'barcode'} eq '' ) {
***************
*** 1985,1989 ****
      my $dbh    = C4::Context->dbh;
      my $bibnum = OLDnewbiblio( $dbh, $biblio );
- 
      # finds new (MARC bibid
      # 	my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$bibnum);
--- 1985,1988 ----
***************
*** 2102,2106 ****
        &MARCfind_MARCbibid_from_oldbiblionumber( $dbh,
          $biblioitem->{biblionumber} );
!     &MARCaddbiblio( $dbh, $MARCbiblio, $biblioitem->{biblionumber}, $bibid );
      return ($bibitemnum);
  }
--- 2101,2105 ----
        &MARCfind_MARCbibid_from_oldbiblionumber( $dbh,
          $biblioitem->{biblionumber} );
!     &MARCaddbiblio( $dbh, $MARCbiblio, $biblioitem->{biblionumber}, '',$bibid );
      return ($bibitemnum);
  }
***************
*** 2573,2577 ****
  			push @and_or, "and";
  			push @excluding, "";
! 			push @operator, "contains";
  			push @value, $record->field($tag)->subfield($subfield);
  # 			warn "for publicationyear, I add $tag / $subfield".$record->field($tag)->subfield($subfield);
--- 2572,2576 ----
  			push @and_or, "and";
  			push @excluding, "";
! 			push @operator, "=";
  			push @value, $record->field($tag)->subfield($subfield);
  # 			warn "for publicationyear, I add $tag / $subfield".$record->field($tag)->subfield($subfield);
***************
*** 2585,2589 ****
  			push @and_or, "and";
  			push @excluding, "";
! 			push @operator, "contains";
  			push @value, $record->field($tag)->subfield($subfield);
  # 			warn "for size, I add $tag / $subfield".$record->field($tag)->subfield($subfield);
--- 2584,2588 ----
  			push @and_or, "and";
  			push @excluding, "";
! 			push @operator, "=";
  			push @value, $record->field($tag)->subfield($subfield);
  # 			warn "for size, I add $tag / $subfield".$record->field($tag)->subfield($subfield);
***************
*** 2597,2601 ****
  			push @and_or, "and";
  			push @excluding, "";
! 			push @operator, "contains";
  			push @value, $record->field($tag)->subfield($subfield);
  # 			warn "for publishercode, I add $tag / $subfield".$record->field($tag)->subfield($subfield);
--- 2596,2600 ----
  			push @and_or, "and";
  			push @excluding, "";
! 			push @operator, "=";
  			push @value, $record->field($tag)->subfield($subfield);
  # 			warn "for publishercode, I add $tag / $subfield".$record->field($tag)->subfield($subfield);
***************
*** 2609,2613 ****
  			push @and_or, "and";
  			push @excluding, "";
! 			push @operator, "contains";
  			push @value, $record->field($tag)->subfield($subfield);
  # 			warn "for volume, I add $tag / $subfield".$record->field($tag)->subfield($subfield);
--- 2608,2612 ----
  			push @and_or, "and";
  			push @excluding, "";
! 			push @operator, "=";
  			push @value, $record->field($tag)->subfield($subfield);
  # 			warn "for volume, I add $tag / $subfield".$record->field($tag)->subfield($subfield);
***************
*** 2618,2622 ****
  	# there is at least 1 result => return the 1st one
  	if ($nbresult) {
! 		warn "$nbresult => ".@$finalresult[0]->{biblionumber},@$finalresult[0]->{bibid},@$finalresult[0]->{title};
  		return @$finalresult[0]->{biblionumber},@$finalresult[0]->{bibid},@$finalresult[0]->{title};
  	}
--- 2617,2621 ----
  	# there is at least 1 result => return the 1st one
  	if ($nbresult) {
! # 		warn "$nbresult => ".@$finalresult[0]->{biblionumber},@$finalresult[0]->{bibid},@$finalresult[0]->{title};
  		return @$finalresult[0]->{biblionumber},@$finalresult[0]->{bibid},@$finalresult[0]->{title};
  	}
***************
*** 2654,2657 ****
--- 2653,2660 ----
  # $Id$
  # $Log$
+ # Revision 1.109  2004/11/24 15:58:31  tipaul
+ # * critical fix for acquisition (see RC3 release notes)
+ # * critical fix for duplicate finder
+ #
  # Revision 1.108  2004/11/19 19:41:22  rangi
  # Shifting branches() from deprecated C4::Catalogue to C4::Biblio

Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** SearchMarc.pm	18 Nov 2004 10:34:24 -0000	1.32
--- SearchMarc.pm	24 Nov 2004 15:58:44 -0000	1.33
***************
*** 212,216 ****
  # 					warn "word : $word";
  					$word =~ s/%//g unless length($word)>4;
! 					unless (C4::Context->stopwords->{uc($word)}) {	#it's NOT a stopword => use it. Otherwise, ignore
  						push @not_tags, @$tags[$i];
  						push @not_and_or, "or"; # as request is negated, finds "foo" or "bar" if final request is NOT "foo" and "bar"
--- 212,216 ----
  # 					warn "word : $word";
  					$word =~ s/%//g unless length($word)>4;
! 					unless (C4::Context->stopwords->{uc($word)} or length($word)==1) {	#it's NOT a stopword => use it. Otherwise, ignore
  						push @not_tags, @$tags[$i];
  						push @not_and_or, "or"; # as request is negated, finds "foo" or "bar" if final request is NOT "foo" and "bar"
***************
*** 237,241 ****
  # 					warn "word : $word";
  					$word =~ s/%//g unless length($word)>4;
! 					unless (C4::Context->stopwords->{uc($word)}) {	#it's NOT a stopword => use it. Otherwise, ignore
  						my $tag = substr(@$tags[$i],0,3);
  						my $subf = substr(@$tags[$i],3,1);
--- 237,241 ----
  # 					warn "word : $word";
  					$word =~ s/%//g unless length($word)>4;
! 					unless (C4::Context->stopwords->{uc($word)} or length($word)==1) {	#it's NOT a stopword => use it. Otherwise, ignore
  						my $tag = substr(@$tags[$i],0,3);
  						my $subf = substr(@$tags[$i],3,1);
***************
*** 339,343 ****
  		my $continue=1;
  		my $line = $sth->fetchrow_hashref;
- 		warn "==> ".$line->{notforloan};
  		my $biblionumber=$line->{bn};
  # 		$continue=0 unless $line->{bn};
--- 339,342 ----





More information about the Koha-cvs mailing list