Followup previous patch bug 2955 :
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 11 Feb 2009 17:31:44 +0000 (18:31 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 11 Feb 2009 17:31:44 +0000 (18:31 +0100)
Some calls to GetMarcFromKohaField would not tell which framework to
use.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
C4/Biblio.pm
C4/Search.pm
cataloguing/addbiblio.pl
misc/migration_tools/rebuild_nozebra.pl

index d89da01..cee44d5 100644 (file)
@@ -2354,7 +2354,7 @@ sub _DelBiblioNoZebra {
     if ($server eq 'biblioserver') {
         %index=GetNoZebraIndexes;
         # get title of the record (to store the 10 first letters with the index)
-        my ($titletag,$titlesubfield) = GetMarcFromKohaField('biblio.title');
+        my ($titletag,$titlesubfield) = GetMarcFromKohaField('biblio.title','');
         $title = lc($record->subfield($titletag,$titlesubfield));
     } else {
         # for authorities, the "title" is the $a mainentry
@@ -2448,7 +2448,7 @@ sub _AddBiblioNoZebra {
     if ($server eq 'biblioserver') {
         %index=GetNoZebraIndexes;
         # get title of the record (to store the 10 first letters with the index)
-        my ($titletag,$titlesubfield) = GetMarcFromKohaField('biblio.title');
+        my ($titletag,$titlesubfield) = GetMarcFromKohaField('biblio.title','');
         $title = lc($record->subfield($titletag,$titlesubfield));
     } else {
         # warn "server : $server";
index 80b5106..60e4cfe 100644 (file)
@@ -1947,9 +1947,9 @@ sub NZorder {
             my $record = GetMarcBiblio($biblionumber);
             my $callnumber;
             my ( $callnumber_tag, $callnumber_subfield ) =
-              GetMarcFromKohaField( $dbh, 'items.itemcallnumber' );
+              GetMarcFromKohaField( 'items.itemcallnumber','' );
             ( $callnumber_tag, $callnumber_subfield ) =
-              GetMarcFromKohaField('biblioitems.callnumber')
+              GetMarcFromKohaField('biblioitems.callnumber','')
               unless $callnumber_tag;
             if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
                 $callnumber = $record->subfield( '200', 'f' );
@@ -2168,8 +2168,8 @@ sub ModBiblios {
         $tag = $tag . $subfield;
         undef $subfield;
     }
-    my ( $bntag,   $bnsubf )   = GetMarcFromKohaField('biblio.biblionumber');
-    my ( $itemtag, $itemsubf ) = GetMarcFromKohaField('items.itemnumber');
+    my ( $bntag,   $bnsubf )   = GetMarcFromKohaField('biblio.biblionumber','');
+    my ( $itemtag, $itemsubf ) = GetMarcFromKohaField('items.itemnumber','');
     if ($tag eq $itemtag) {
         # do not allow the embedded item tag to be 
         # edited from here
index aa71a91..647c754 100755 (executable)
@@ -93,7 +93,7 @@ sub MARCfindbreeding {
             if (    C4::Context->preference("z3950NormalizeAuthor")
                 and C4::Context->preference("z3950AuthorAuthFields") )
             {
-                my ( $tag, $subfield ) = GetMarcFromKohaField("biblio.author");
+                my ( $tag, $subfield ) = GetMarcFromKohaField("biblio.author",'');
 
  #                 my $summary = C4::Context->preference("z3950authortemplate");
                 my $auth_fields =
index ec71137..51058e8 100755 (executable)
@@ -115,7 +115,7 @@ while (my ($biblionumber) = $sth->fetchrow) {
     }
     next unless $record;
     # get title of the record (to store the 10 first letters with the index)
-    my ($titletag,$titlesubfield) = GetMarcFromKohaField('biblio.title');
+    my ($titletag,$titlesubfield) = GetMarcFromKohaField('biblio.title','');
     my $title = lc($record->subfield($titletag,$titlesubfield));
 
     # remove blancks comma (that could cause problem when decoding the string for CQL retrieval) and regexp specific values