[Koha-patches] [PATCH] Followup previous patch bug 2955 :

Henri-Damien LAURENT henridamien.laurent at biblibre.com
Wed Feb 11 18:59:06 CET 2009


Some calls to GetMarcFromKohaField would not tell which framework to
use.

Signed-off-by: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>
---
 C4/Biblio.pm                            |    4 ++--
 C4/Search.pm                            |    8 ++++----
 cataloguing/addbiblio.pl                |    2 +-
 misc/migration_tools/rebuild_nozebra.pl |    2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index d89da01..cee44d5 100644
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -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";
diff --git a/C4/Search.pm b/C4/Search.pm
index 80b5106..60e4cfe 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -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
diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl
index aa71a91..647c754 100755
--- a/cataloguing/addbiblio.pl
+++ b/cataloguing/addbiblio.pl
@@ -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 =
diff --git a/misc/migration_tools/rebuild_nozebra.pl b/misc/migration_tools/rebuild_nozebra.pl
index ec71137..51058e8 100755
--- a/misc/migration_tools/rebuild_nozebra.pl
+++ b/misc/migration_tools/rebuild_nozebra.pl
@@ -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
-- 
1.5.6.3




More information about the Koha-patches mailing list