[Koha-cvs] koha/C4 Biblio.pm [rel_3_0]

paul poulain paul at koha-fr.org
Fri Nov 17 12:18:48 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	paul poulain <tipaul>	06/11/17 11:18:48

Modified files:
	C4             : Biblio.pm 

Log message:
	* removing useless subs
	* moving bibid to biblionumber where needed

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.178.2.23&r2=1.178.2.24

Patches:
Index: Biblio.pm
===================================================================
RCS file: /sources/koha/koha/C4/Biblio.pm,v
retrieving revision 1.178.2.23
retrieving revision 1.178.2.24
diff -u -b -r1.178.2.23 -r1.178.2.24
--- Biblio.pm	17 Nov 2006 09:39:04 -0000	1.178.2.23
+++ Biblio.pm	17 Nov 2006 11:18:47 -0000	1.178.2.24
@@ -63,17 +63,11 @@
   &skip &getitemtypes
   &get_itemnumbers_of
 
-  &MARCfind_oldbiblionumber_from_MARCbibid
-  &MARCfind_MARCbibid_from_oldbiblionumber
   &MARCfind_marc_from_kohafield
   &MARCfindsubfield
   &MARCfind_frameworkcode
   &MARCgettagslib
   &MARCmoditemonefield
-  &NEWnewbiblio &NEWnewitem
-  &NEWmodbiblio &NEWmoditem
-  &NEWdelbiblio &NEWdelitem
-  &NEWmodbiblioframework
   &zebraop
 
   &MARCaddbiblio &MARCadditem &MARCmodLCindex
@@ -84,7 +78,6 @@
   &MARCgetbiblio &MARCgetitem &XMLgetbiblio
   &MARCaddword &MARCdelword 
   &MARCdelsubfield
-  &MARCgetbiblio2
   &char_decode
   &DisplayISBN
 &itemcalculator &calculatelc
@@ -430,7 +423,7 @@
 
 =over 4
 
-my $error = &DelBiblio($dbh,$bibid);
+my $error = &DelBiblio($dbh,$biblionumber);
 
 Exported function (core API) for deleting a biblio in koha.
 
@@ -726,24 +719,6 @@
     return ($relations->{$frameworkcode}->{$kohafield}->[0],$relations->{$frameworkcode}->{$kohafield}->[1]);
 }
 
-sub MARCfind_oldbiblionumber_from_MARCbibid {
-    my ( $dbh, $MARCbibid ) = @_;
-#    my $sth =
- #     $dbh->prepare("select biblionumber from marc_biblio where bibid=?");
-#    $sth->execute($MARCbibid);
- #   my ($biblionumber) = $sth->fetchrow;
-    return $MARCbibid;
-}
-
-=head2 MARCfind_MARCbibid_from_oldbiblionumber
-
-=cut
-
-sub MARCfind_MARCbibid_from_oldbiblionumber {
-    my ( $dbh, $oldbiblionumber ) = @_;
-    return $oldbiblionumber;
-}
-
 =head2 MARCaddbiblio
 
 &MARCaddbiblio($dbh,$newrec,$biblionumber,$frameworkcode);
@@ -815,9 +790,9 @@
 =cut
 
 sub MARCgetbiblio {
-    my ( $dbh, $bibid ) = @_;
+    my ( $dbh, $biblionumber ) = @_;
     my $sth=$dbh->prepare("select marcxml from biblioitems where biblionumber=? "  );
-    $sth->execute($bibid);
+    $sth->execute($biblionumber);
     my ($marcxml)=$sth->fetchrow;
     $marcxml =~ s/\x1e//g;
     $marcxml =~ s/\x1f//g;
@@ -847,40 +822,6 @@
      return $marcxml;
 }
 
-=head2 MARCgetbiblio2
-
-    my $sth =
-      $dbh->prepare("select marc from biblioitems where biblionumber=? "  );
-    
-    $sth->execute($biblionumber);
-       my ($marc)=$sth->fetchrow;
-    $marc=MARC::File::USMARC::decode($marc);
-    my $marcxml=$marc->as_xml_record();
-     return $marcxml;
-
-=cut
-
-sub MARCgetbiblio2 {
-
-    # Returns MARC::Record of the biblio passed in parameter.
-    my ( $dbh, $bibid ) = @_;
-  
-
-    my $sth =
-      $dbh->prepare("select marc from biblioitems where biblionumber=? "  );
-    
-    $sth->execute($bibid);
-   my ($marc)=$sth->fetchrow;
- my $record = MARC::File::USMARC::decode($marc);
-my $oldbiblio = MARCmarc2koha($dbh,$record,'');
-   if($oldbiblio->{'biblionumber'}){
- return $record;
-}else{
-    warn "Record $bibid does not have field for biblionumber";
-    return undef;
-}
-}
-
 =head2 MARCgetitem_frombarcode
 
 =cut
@@ -938,7 +879,7 @@
 
 =head2 MARCmodbiblio
 
-MARCmodbibio($dbh,$bibid,$record,$frameworkcode,1);
+MARCmodbibio($dbh,$biblionumber,$record,$frameworkcode,1);
 
 Modify a biblio record with the option to save items data
 
@@ -990,7 +931,7 @@
 =cut
 
 sub MARCdelbiblio {
-    my ( $dbh, $bibid, $keep_items ) = @_;
+    my ( $dbh, $biblionumber, $keep_items ) = @_;
 
     # if the keep_item is set to 1, then all items are preserved.
     # This flag is set when the delbiblio is called by modbiblio
@@ -1000,8 +941,8 @@
 # 1st of all, copy the MARC::Record to deletedbiblio table => if a true deletion, MARC data will be kept.
 # if deletion called before MARCmodbiblio => won't do anything, as the oldbiblionumber doesn't
     # exist in deletedbiblio table
-    my $record = MARCgetbiblio( $dbh, $bibid );
-    my $oldbiblionumber = $bibid;
+    my $record = MARCgetbiblio( $dbh, $biblionumber );
+    my $oldbiblionumber = $biblionumber;
     my $copy2deleted = $dbh->prepare("update deletedbiblio set marc=? where biblionumber=?");
     $copy2deleted->execute( $record->as_usmarc(), $oldbiblionumber );
  my @fields = $record->fields();
@@ -1124,137 +1065,6 @@
     &MARCaddbiblio($dbh,$newrec,$biblionumber);
 
 }
-
-=head2 MARCmodsubfield
-
-=cut
-
-sub MARCmodsubfield {
-
-    # Subroutine changes a subfield value given a subfieldid.
-    my ( $dbh, $subfieldid, $subfieldvalue ) = @_;
-    $dbh->do("lock tables marc_blob_subfield WRITE,marc_subfield_table WRITE");
-    my $sth1 =
-      $dbh->prepare(
-        "select valuebloblink from marc_subfield_table where subfieldid=?");
-    $sth1->execute($subfieldid);
-    my ($oldvaluebloblink) = $sth1->fetchrow;
-    $sth1->finish;
-    my $sth;
-
-    # if too long, use a bloblink
-    if ( length($subfieldvalue) > 255 ) {
-
-        # if already a bloblink, update it, otherwise, insert a new one.
-        if ($oldvaluebloblink) {
-            $sth =
-              $dbh->prepare(
-"update marc_blob_subfield set subfieldvalue=? where blobidlink=?"
-            );
-            $sth->execute( $subfieldvalue, $oldvaluebloblink );
-        }
-        else {
-            $sth =
-              $dbh->prepare(
-                "insert into marc_blob_subfield (subfieldvalue) values (?)");
-            $sth->execute($subfieldvalue);
-            $sth =
-              $dbh->prepare("select max(blobidlink) from marc_blob_subfield");
-            $sth->execute;
-            my ($res) = $sth->fetchrow;
-            $sth =
-              $dbh->prepare(
-"update marc_subfield_table set subfieldvalue=null, valuebloblink=? where subfieldid=?"
-            );
-            $sth->execute( $res, $subfieldid );
-        }
-    }
-    else {
-
-# note this can leave orphan bloblink. Not a big problem, but we should build somewhere a orphan deleting script...
-        $sth =
-          $dbh->prepare(
-"update marc_subfield_table set subfieldvalue=?,valuebloblink=null where subfieldid=?"
-        );
-        $sth->execute( $subfieldvalue, $subfieldid );
-    }
-    $dbh->do("unlock tables");
-    $sth->finish;
-    $sth =
-      $dbh->prepare(
-"select bibid,tag,tagorder,subfieldcode,subfieldid,subfieldorder from marc_subfield_table where subfieldid=?"
-    );
-    $sth->execute($subfieldid);
-    my ( $bibid, $tagid, $tagorder, $subfieldcode, $x, $subfieldorder ) =
-      $sth->fetchrow;
-    $subfieldid = $x;
-        return ( $subfieldid, $subfieldvalue );
-}
-
-=head2 MARCfindsubfield
-
-=cut
-
-sub MARCfindsubfield {
-    my ( $dbh, $bibid, $tag, $subfieldcode, $subfieldorder, $subfieldvalue ) =
-      @_;
-    my $resultcounter = 0;
-    my $subfieldid;
-    my $lastsubfieldid;
-    my $query =
-"select subfieldid from marc_subfield_table where bibid=? and tag=? and subfieldcode=?";
-    my @bind_values = ( $bibid, $tag, $subfieldcode );
-    if ($subfieldvalue) {
-        $query .= " and subfieldvalue=?";
-        push ( @bind_values, $subfieldvalue );
-    }
-    else {
-        if ( $subfieldorder < 1 ) {
-            $subfieldorder = 1;
-        }
-        $query .= " and subfieldorder=?";
-        push ( @bind_values, $subfieldorder );
-    }
-    my $sti = $dbh->prepare($query);
-    $sti->execute(@bind_values);
-    while ( ($subfieldid) = $sti->fetchrow ) {
-        $resultcounter++;
-        $lastsubfieldid = $subfieldid;
-    }
-    if ( $resultcounter > 1 ) {
-
-# Error condition.  Values given did not resolve into a unique record.  Don't know what to edit
-# should rarely occur (only if we use subfieldvalue with a value that exists twice, which is strange)
-        return -1;
-    }
-    else {
-        return $lastsubfieldid;
-    }
-}
-
-=head2 MARCfindsubfieldid
-
-=cut
-
-sub MARCfindsubfieldid {
-    my ( $dbh, $bibid, $tag, $tagorder, $subfield, $subfieldorder ) = @_;
-    my $sth = $dbh->prepare( "select subfieldid from marc_subfield_table
-                where bibid=? and tag=? and tagorder=?
-                    and subfieldcode=? and subfieldorder=?"
-    );
-    $sth->execute( $bibid, $tag, $tagorder, $subfield, $subfieldorder );
-    my ($res) = $sth->fetchrow;
-    unless ($res) {
-        $sth = $dbh->prepare( "select subfieldid from marc_subfield_table
-                where bibid=? and tag=? and tagorder=?
-                    and subfieldcode=?"
-        );
-        $sth->execute( $bibid, $tag, $tagorder, $subfield );
-        ($res) = $sth->fetchrow;
-    }
-    return $res;
-}
-
 =head2 MARCfind_frameworkcode
 
 =cut
@@ -1267,28 +1077,6 @@
     return $frameworkcode;
 }
 
-=head2 MARCdelsubfield
-
-=cut
-
-sub MARCdelsubfield {
-
-    # delete a subfield for $bibid / tag / tagorder / subfield / subfieldorder
-    my ( $dbh, $bibid, $tag, $tagorder, $subfield, $subfieldorder ) = @_;
-    if ($subfieldorder) {
-        $dbh->do( "delete from marc_subfield_table where bibid='$bibid' and
-                tag='$tag' and tagorder='$tagorder'
-                and subfieldcode='$subfield' and subfieldorder='$subfieldorder'
-                "
-        );
-            } else {
-        $dbh->do( "delete from marc_subfield_table where bibid='$bibid' and
-                tag='$tag' and tagorder='$tagorder'
-                and subfieldcode='$subfield'"
-        );
-            }
-}
-
 =head MARCkoha2marcBiblio
 
 =cut
@@ -1303,7 +1091,7 @@
     );
     my $record = MARC::Record->new();
 
-    #--- if bibid, then retrieve old-style koha data
+    #--- if biblionumber, then retrieve old-style koha data
     if ( $biblionumber > 0 ) {
         my $sth2 =
           $dbh->prepare(
@@ -1698,52 +1486,7 @@
     return $result;
 }
 
-=head2 MARCaddword
-
-=cut
 
-sub MARCaddword {
-
-    # split a subfield string and adds it into the word table.
-    # removes stopwords
-    my (
-        $dbh,        $bibid,         $tag,    $tagorder,
-        $subfieldid, $subfieldorder, $sentence
-      )
-      = @_;
-    $sentence =~ s/(\.|\?|\:|\!|\'|,|\-|\"|\(|\)|\[|\]|\{|\}|\/)/ /g;
-    my @words = split / /, $sentence;
-    my $stopwords = C4::Context->stopwords;
-    my $sth       =
-      $dbh->prepare(
-"insert into marc_word (bibid, tagsubfield, tagorder, subfieldorder, word, sndx_word)
-            values (?,concat(?,?),?,?,?,soundex(?))"
-    );
-    foreach my $word (@words) {
-# we record only words one char long and not in stopwords hash
-    if (length($word)>=1 and !($stopwords->{uc($word)})) {
-        $sth->execute($bibid,$tag,$subfieldid,$tagorder,$subfieldorder,$word,$word);
-        if ($sth->err()) {
-        warn "ERROR ==> insert into marc_word (bibid, tagsubfield, tagorder, subfieldorder, word, sndx_word) values ($bibid,concat($tag,$subfieldid),$tagorder,$subfieldorder,$word,soundex($word))\n";
-        }
-    }
-    }
-}
-
-=head2 MARCdelword
-
-=cut
-
-sub MARCdelword {
-
-# delete words. this sub deletes all the words from a sentence. a subfield modif is done by a delete then a add
-    my ( $dbh, $bibid, $tag, $tagorder, $subfield, $subfieldorder ) = @_;
-    my $sth =
-      $dbh->prepare(
-"delete from marc_word where bibid=? and tagsubfield=concat(?,?) and tagorder=? and subfieldorder=?"
-    );
-    $sth->execute( $bibid, $tag, $subfield, $tagorder, $subfieldorder );
-}
 
 =head2 MARCitemchange
 
@@ -1975,141 +1718,6 @@
 	return($indicator, at result);
 }
 
-sub NEWmodbiblio {
-    my ($record,$bibid,$frameworkcode) =@_;
-    my $dbh = C4::Context->dbh;
-    $frameworkcode="" unless $frameworkcode;
-    &MARCmodbiblio($dbh, $bibid,$record,$frameworkcode,1);
-    my $oldbiblio = MARCmarc2koha($dbh,$record,$frameworkcode);
-
-    
-    my $oldbiblionumber = _koha_modify_biblio($dbh,$oldbiblio);
-
-
-    OLDmodbibitem($dbh,$oldbiblio);
-
-    # now, modify addi authors, subject, addititles.
-    my ($tagfield,$tagsubfield) = MARCfind_marc_from_kohafield($dbh,"additionalauthors.author",$frameworkcode);
-    my @addiauthfields = $record->field($tagfield);
-    foreach my $addiauthfield (@addiauthfields) {
-        my @addiauthsubfields = $addiauthfield->subfield($tagsubfield);
-        foreach my $subfieldcount (0..$#addiauthsubfields) {
-            OLDmodaddauthor($dbh,$oldbiblionumber,$addiauthsubfields[$subfieldcount]);
-        }
-    }
-    ($tagfield,$tagsubfield) = MARCfind_marc_from_kohafield($dbh,"bibliosubtitle.subtitle",$frameworkcode);
-    my @subtitlefields = $record->field($tagfield);
-    foreach my $subtitlefield (@subtitlefields) {
-        my @subtitlesubfields = $subtitlefield->subfield($tagsubfield);
-        # delete & create subtitle again because OLDmodsubtitle can't handle new subtitles
-        # between 2 modifs
-        $dbh->do("delete from bibliosubtitle where biblionumber=$oldbiblionumber");
-        foreach my $subfieldcount (0..$#subtitlesubfields) {
-            foreach my $subtit(split /\||#/,$subtitlesubfields[$subfieldcount]) {
-                OLDnewsubtitle($dbh,$oldbiblionumber,$subtit);
-            }
-        }
-    }
-    ($tagfield,$tagsubfield) = MARCfind_marc_from_kohafield($dbh,"bibliosubject.subject",$frameworkcode);
-    my @subj = $record->field($tagfield);
-    my @subjects;
-    foreach my $subject (@subj) {
-        my @subjsubfield = $subject->subfield($tagsubfield);
-        foreach my $subfieldcount (0..$#subjsubfield) {
-            push @subjects,$subjsubfield[$subfieldcount];
-        }
-    }
-    OLDmodsubject($dbh,$oldbiblionumber,1, at subjects);
-    return 1;
-}
-
-sub NEWdelbiblio {
-    my ( $dbh, $bibid ) = @_;
-    my $biblio = &MARCfind_oldbiblionumber_from_MARCbibid( $dbh, $bibid );
-
-&zebraop($dbh,$bibid,"RecordDelete","biblioserver");
-    &OLDdelbiblio( $dbh, $biblio );
-    my $sth =
-      $dbh->prepare(
-        "select biblioitemnumber from biblioitems where biblionumber=?");
-    $sth->execute($biblio);
-    while ( my ($biblioitemnumber) = $sth->fetchrow ) {
-        OLDdeletebiblioitem( $dbh, $biblioitemnumber );
-    }
-    
-    &MARCdelbiblio( $dbh, $bibid, 0 );
-    
-}
-
-sub NEWnewitem {
-    my ( $dbh, $record, $bibid ) = @_;
-    # add item in old-DB
-    my $frameworkcode=MARCfind_frameworkcode($dbh,$bibid);
-    my $item = &MARCmarc2koha( $dbh, $record,$frameworkcode );
-    # needs old biblionumber and biblioitemnumber
-    $item->{'biblionumber'} =MARCfind_oldbiblionumber_from_MARCbibid( $dbh, $bibid );
-    my $sth =
-      $dbh->prepare(
-        "select biblioitemnumber,itemtype from biblioitems where biblionumber=?");
-    $sth->execute( $item->{'biblionumber'} );
-my $itemtype;
-    ( $item->{'biblioitemnumber'}, $itemtype ) = $sth->fetchrow;
-$sth=$dbh->prepare("select notforloan from itemtypes where itemtype='$itemtype'");
-$sth->execute();
-my $notforloan=$sth->fetchrow;
-##Change the notforloan field if $notforloan found
-if ($notforloan >0){
-$item->{'notforloan'}=$notforloan;
-&MARCitemchange($dbh,$record,"items.notforloan",$notforloan);
-}
-if(!$item->{'dateaccessioned'}||$item->{'dateaccessioned'} eq ''){
-# find today's date
-my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =                                                           
-localtime(time); $year +=1900; $mon +=1;
-my $date = "$year-".sprintf ("%0.2d", $mon)."-".sprintf("%0.2d",$mday);
-$item->{'dateaccessioned'}=$date;
-&MARCitemchange($dbh,$record,"items.dateaccessioned",$date);
-
-}
-    my ( $itemnumber, $error ) = &OLDnewitems( $dbh, $item, $item->{barcode} );
-    # add itemnumber to MARC::Record before adding the item.
-    $sth =
-      $dbh->prepare(
-"select tagfield,tagsubfield from marc_subfield_structure where frameworkcode=? and kohafield=?"
-    );
-    &MARCkoha2marcOnefield( $sth, $record, "items.itemnumber", $itemnumber,$frameworkcode );
-##NEU specific add cataloguers cardnumber as well
-my $cardtag=C4::Context->preference('itemcataloguersubfield');
-if ($cardtag){    
-$sth->execute($frameworkcode,"items.itemnumber");
-my ($itemtag,$subtag)=$sth->fetchrow;    
-my $me= C4::Context->userenv;
-my $cataloguer=$me->{'cardnumber'} if ($me);
-my $newtag= $record->field($itemtag);
-$newtag->update($cardtag=>$cataloguer) if ($me);
-$record->delete_field($newtag);
-$record->append_fields($newtag);    
-}
-    # add the item
-    my $bib = &MARCadditem( $dbh, $record, $item->{'biblionumber'} );
-}
-
-sub NEWmoditem {
-    my ( $dbh, $record, $bibid, $itemnumber, $delete ) = @_;
-
-    &MARCmoditem( $dbh, $record, $bibid, $itemnumber, $delete );
-    my $frameworkcode=MARCfind_frameworkcode($dbh,$bibid);
-    my $olditem = MARCmarc2koha( $dbh, $record,$frameworkcode );
-    OLDmoditem( $dbh, $olditem );
-}
-
-sub NEWdelitem {
-    my ( $dbh, $bibid, $itemnumber ) = @_;
-    my $biblio = &MARCfind_oldbiblionumber_from_MARCbibid( $dbh, $bibid );
-    &OLDdelitem( $dbh, $itemnumber );
-    my $newrec=&MARCdelitem( $dbh, $bibid, $itemnumber );
-&MARCaddbiblio($dbh,$newrec,$bibid,);
-}
 
 =head2 GetItemFromBarcode
 
@@ -2839,7 +2447,7 @@
     my $dbh    = C4::Context->dbh;
     my $bibnum = _koha_add_biblio( $dbh, $biblio );
     # finds new (MARC bibid
-    #     my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$bibnum);
+    #     my $biblionumber = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$bibnum);
     my $record = &MARCkoha2marcBiblio( $dbh, $bibnum );
     MARCaddbiblio($dbh,$record, $bibnum,'' );
     return ($bibnum);
@@ -2869,8 +2477,8 @@
     my $biblionumber=_koha_modify_biblio($dbh,$biblio);
     my $record = MARCkoha2marcBiblio($dbh,$biblionumber,$biblionumber);
     # finds new (MARC bibid
-    my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$biblionumber);
-    MARCmodbiblio($dbh,$bibid,$record,"",0);
+    my $biblionumber = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$biblionumber);
+    MARCmodbiblio($dbh,$biblionumber,$record,"",0);
     return($biblionumber);
 } # sub modbiblio
 
@@ -2928,8 +2536,8 @@
         # This check is to ensure that no MARC data exists to lose.
         if (C4::Context->preference("MARC") eq '0'){
             my $MARCRecord = &MARCkoha2marcBiblio($dbh,$bibnum);
-            my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$bibnum);
-            &MARCmodbiblio($dbh,$bibid, $MARCRecord);
+            my $biblionumber = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$bibnum);
+            &MARCmodbiblio($dbh,$biblionumber, $MARCRecord);
         }
     }
     return ($error);
@@ -2995,8 +2603,8 @@
     # it's faster and zebra and marc will be synched anyway by the cron job
     unless ($op eq "setstatus") {
         my $MARCitem = &MARCkoha2marcItem( $dbh, $item->{'biblionumber'}, $item->{'itemnum'} );
-        my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber( $dbh, $item->{biblionumber} );
-    &MARCmoditem( $dbh, $MARCitem, $bibid, $item->{itemnum}, 0 );
+        my $biblionumber = &MARCfind_MARCbibid_from_oldbiblionumber( $dbh, $item->{biblionumber} );
+    &MARCmoditem( $dbh, $MARCitem, $biblionumber, $item->{itemnum}, 0 );
     }
 }
 
@@ -3317,8 +2925,8 @@
     my ($biblio) = @_;
     my $dbh = C4::Context->dbh;
     &OLDdelbiblio( $dbh, $biblio );
-    my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber( $dbh, $biblio );
-    &MARCdelbiblio( $dbh, $bibid, 0 );
+    my $biblionumber = &MARCfind_MARCbibid_from_oldbiblionumber( $dbh, $biblio );
+    &MARCdelbiblio( $dbh, $biblionumber, 0 );
 }
 
 =item GetBiblioItemByBiblioNumber
@@ -4041,8 +3649,12 @@
 
 =cut
 
-# $Id: Biblio.pm,v 1.178.2.23 2006/11/17 09:39:04 btoumi Exp $
+# $Id: Biblio.pm,v 1.178.2.24 2006/11/17 11:18:47 tipaul Exp $
 # $Log: Biblio.pm,v $
+# Revision 1.178.2.24  2006/11/17 11:18:47  tipaul
+# * removing useless subs
+# * moving bibid to biblionumber where needed
+#
 # Revision 1.178.2.23  2006/11/17 09:39:04  btoumi
 # bug fix double declaration of variable in same function
 #
@@ -4167,215 +3779,3 @@
 # Revision 1.115.2.18  2005/08/02 07:45:44  tipaul
 # fix for bug http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1009
 # (Not all items fields mapped to MARC)
-#
-# Revision 1.115.2.17  2005/08/01 15:15:43  tipaul
-# adding decoder for Ä string
-#
-# Revision 1.115.2.16  2005/07/28 19:56:15  tipaul
-# * removing a useless & CPU consuming call to MARCgetbiblio
-# * Leader management.
-# If you create a MARC tag "000", with a subfield '@', it will be managed as the leader.
-# Seems to work correctly.
-#
-# Now going to create a plugin for leader()
-#
-# Revision 1.115.2.15  2005/07/19 15:25:40  tipaul
-# * fixing a bug in subfield order when MARCgetbiblio
-# * getting rid with the limit "biblionumber & biblioitemnumber must be in the same tag". So, we can put biblionumber in 001 (field that has no subfields, so we can't put biblioitemnumber in this field), and use biblionumber as identifier in the MARC biblio too. Still to be deeply tested.
-# * adding some diacritic decoding (Ä, Ü...)
-#
-# Revision 1.115.2.14  2005/06/27 23:24:06  hdl
-# Display dashed ISBN
-#
-# Revision 1.115.2.13  2005/05/31 12:44:26  tipaul
-# patch from Genji (Waylon R.) to update subjects in MARC tables when systempref has MARC=OFF
-#
-# Revision 1.115.2.12  2005/05/30 11:22:41  tipaul
-# fixing a bug : when a field was repeated, the last field was also repeated. (Was due to the "empty" field in html between fields : to separate fields, in html, an empty field is automatically added. in MARChtml2marc, this empty field was not discarded correctly)
-#
-# Revision 1.115.2.11  2005/05/25 15:48:43  tipaul
-# * removing my for variables already declared
-# * updating biblio.unititle  field as well as other fields in biblio table
-#
-# Revision 1.115.2.10  2005/05/25 09:30:50  hdl
-# Adding NEWmodbiblioframework feature
-# Used by addbiblio.pl when modifying a framework selection.
-#
-# Revision 1.115.2.9  2005/04/07 10:05:25  tipaul
-# adding / to the list of symbols that are replace by spaces for searches
-#
-# Revision 1.115.2.8  2005/03/25 16:23:49  tipaul
-# some improvements :
-# * return immediatly when a subfield is empty
-# * search duplicate on isbn must be done only when there is an isbn ;-)
-#
-# Revision 1.115.2.7  2005/03/10 15:52:28  tipaul
-# * adding glass to opac marc detail.
-# * changing glasses behaviour : It now appears only on subfields that have a "link" value. Avoid useless glasses and removes nothing. **** WARNING **** : if you don't change you MARC parameters, glasses DISAPPEAR, because no subfields have a link value. So you MUST "reactivate" them manually. If you want to enable the search glass on field 225$a (collection in UNIMARC), just put 225a to "link" field (Koha >> parameters >> framework >> 225 field >> subfield >> modify $a >> enter 225a in link input field (without quotes or anything else)
-# * fixing bug with libopac
-#
-# Revision 1.115.2.6  2005/03/09 15:56:01  tipaul
-# Changing MARCmoditem to be like MARCmodbiblio : a modif is a delete & create.
-# Longer, but solves problems with repeated subfields.
-#
-# The previous version was not buggy except under certain circumstances (a repeated subfield, that does not exist usually in items)
-#
-# Revision 1.115.2.5  2005/02/24 13:54:04  tipaul
-# exporting MARCdelsubfield sub. It's used in authority merging.
-# Modifying it too to enable deletion of all subfields from a given tag/subfield or just one.
-#
-# Revision 1.115.2.4  2005/02/17 12:44:25  tipaul
-# bug in acquisition : the title was also stored as subtitle.
-#
-# Revision 1.115.2.3  2005/02/10 13:14:36  tipaul
-# * multiple main authors are now correctly handled in simple (non-MARC) view
-#
-# Revision 1.115.2.2  2005/01/11 16:02:35  tipaul
-# in catalogue, modifs were not stored properly the non-MARC item DB. Affect only libraries without barcodes.
-#
-# Revision 1.115.2.1  2005/01/11 14:45:37  tipaul
-# bugfix : issn were not stored correctly in non-MARC DB on biblio modification
-#
-# Revision 1.115  2005/01/06 14:32:17  tipaul
-# improvement of speed for bulkmarcimport.
-# A sub had been forgotten to use the C4::Context->marcfromkohafield array, that caches DB datas.
-# this is only a little improvement for normal DB modif, but almost x2 the speed of bulkmarcimport... from 6records/seconds to more than 10.
-#
-# Revision 1.114  2005/01/03 10:48:33  tipaul
-# * bugfix for the search on a MARC detail, when you clic on the magnifying glass (caused an internal server error)
-# * partial support of the "linkage" MARC feature : if you enter a "link" on a MARC subfield, the magnifying glass won't search on the field, but on the linked field. I agree it's a partial support. Will be improved, but I need to investigate MARC21 & UNIMARC diffs on this topic.
-#
-# Revision 1.113  2004/12/10 16:27:53  tipaul
-# limiting the number of search term to 8. There was no limit before, but 8 words seems to be the upper limit mySQL can deal with (in less than a second. tested on a DB with 13 000 items)
-# In 2.4, a new DB structure will highly speed things and this limit will be removed.
-# FindDuplicate is activated again, the perf problems were due to this problem.
-#
-# Revision 1.112  2004/12/08 10:14:42  tipaul
-# * desactivate FindDuplicate
-# * fix from Genji
-#
-# Revision 1.111  2004/11/25 17:39:44  tipaul
-# removing useless &branches in package declaration
-#
-# Revision 1.110  2004/11/24 16:00:01  tipaul
-# removing sub branches (commited by chris for MARC=OFF bugfix, but sub branches is already in Acquisition.pm)
-#
-# 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
-# Allowing the non marc interface acquisitions to work.
-#
-# Revision 1.107  2004/11/05 10:15:27  tipaul
-# Improving FindDuplicate to find duplicate records on adding biblio
-#
-# Revision 1.106  2004/11/02 16:44:45  tipaul
-# new feature : checking for duplicate biblio.
-#
-# For instance, it's only done on ISBN only. Will be improved soon.
-#
-# When a duplicate is detected, the biblio is not saved, but the user is asked for a confirmations.
-#
-# Revision 1.105  2004/09/23 16:15:37  tipaul
-# indenting diff
-#
-# Revision 1.104  2004/09/16 15:06:46  tipaul
-# enabling # (| still possible too) for repeatable subfields
-#
-# Revision 1.103  2004/09/06 14:17:34  tipaul
-# some commented warning added + 1 major bugfix => drop empty fields, NOT fields containing 0
-#
-# Revision 1.102  2004/09/06 10:00:19  tipaul
-# adding a "location" field to the library.
-# This field is useful when the callnumber contains no information on the room where the item is stored.
-# With this field, we now have 3 levels of informations to find a book :
-# * the branch.
-# * the location.
-# * the callnumber.
-#
-# This should be versatile enough to solve any storing method.
-# This hack is quite simple, due to the nice Biblio.pm API. The MARC => koha db link is automatically managed. Just add the link in the parameters section.
-#
-# Revision 1.101  2004/08/18 16:01:37  tipaul
-# modifs to support frameworkcodes
-#
-# Revision 1.100  2004/08/13 16:37:25  tipaul
-# adding frameworkcode to API in some subs
-#
-# Revision 1.99  2004/07/30 13:54:50  doxulting
-# Beginning of serial commit
-#
-# Revision 1.98  2004/07/15 09:48:10  tipaul
-# * removing useless sub
-# * minor bugfix in moditem (managing homebranch & holdingbranch)
-#
-# Revision 1.97  2004/07/02 15:53:53  tipaul
-# bugfix (due to frameworkcode field)
-#
-# Revision 1.96  2004/06/29 16:07:10  tipaul
-# last sync for 2.1.0 release
-#
-# Revision 1.95  2004/06/26 23:19:59  rangi
-# Fixing modaddauthor, and adding getitemtypes.
-# Also tidying up formatting of code
-#
-# Revision 1.94  2004/06/17 08:16:32  tipaul
-# merging tag & subfield in marc_word for better perfs
-#
-# Revision 1.93  2004/06/11 15:38:06  joshferraro
-# Changes MARCaddword to index words >= 1 char ... needed for more accurate
-# searches using SearchMarc routines.
-#
-# Revision 1.92  2004/06/10 08:29:01  tipaul
-# MARC authority management (continued)
-#
-# Revision 1.91  2004/06/03 10:03:01  tipaul
-# * frameworks and itemtypes are independant
-# * in the MARC editor, showing the + to duplicate a tag only if the tag is repeatable
-#
-# Revision 1.90  2004/05/28 08:25:53  tipaul
-# hidding hidden & isurl constraints into MARC subfield structure
-#
-# Revision 1.89  2004/05/27 21:47:21  rangi
-# Fix for bug 787
-#
-# Revision 1.88  2004/05/18 15:23:49  tipaul
-# framework management : 1 MARC framework for each itemtype
-#
-# Revision 1.87  2004/05/18 11:54:07  tipaul
-# getitemtypes moved in Koha.pm
-#
-# Revision 1.86  2004/05/03 09:19:22  tipaul
-# some fixes for mysql prepare & execute
-#
-# Revision 1.85  2004/04/02 14:55:48  tipaul
-# renaming items.bulk field to items.itemcallnumber.
-# Will be used to store call number for libraries that don't use dewey classification.
-# Note it's related to ITEMS, not biblio.
-#
-# Revision 1.84  2004/03/24 17:18:30  joshferraro
-# Fixes bug 749 by removing the comma on line 1488.
-#
-# Revision 1.83  2004/03/15 14:31:50  tipaul
-# adding a minor check
-#
-# Revision 1.82  2004/03/07 05:47:31  acli
-# Various updates/fixes from rel_2_0
-# Fixes for bugs 721 (templating), 727, and 734
-#
-# Revision 1.81  2004/03/06 20:26:13  tipaul
-# adding seealso feature in MARC searches
-#
-# Revision 1.80  2004/02/12 13:40:56  tipaul
-# deleting subs duplicated by error
-#
-# Revision 1.79  2004/02/11 08:40:09  tipaul
-# synch'ing 2.0.0 branch and head
-#
-# Revision 1.78.2.3  2004/02/10 13:15:46  tipaul
-# removing 2 warnings
-#
-# Revision 1.78.2.2  2004/01/26 10:38:06  tipaul
-# dealing correctly "bulk" field





More information about the Koha-cvs mailing list