X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FBiblio.pm;h=56cd94e0d00b28d787058160b11c7bf9eea0a986;hb=d76dbace5e6436ae5244876b52ffcdc4831f91db;hp=54db228e94a799064205b0bd0e1bc3eab3cd3fb9;hpb=d5542514d22ca5b9fc6bfb4fb8b6db61e3a512b5;p=koha_gimpoz diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 54db228e94..56cd94e0d0 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1081,7 +1081,7 @@ sub GetMarcStructure { } $sth = $dbh->prepare( - "SELECT tagfield,tagsubfield,liblibrarian,libopac,tab,mandatory,repeatable,authorised_value,authtypecode,value_builder,kohafield,seealso,hidden,isurl,link,defaultvalue + "SELECT tagfield,tagsubfield,liblibrarian,libopac,tab,mandatory,repeatable,authorised_value,authtypecode,value_builder,kohafield,seealso,hidden,isurl,link,defaultvalue,maxlength FROM marc_subfield_structure WHERE frameworkcode=? ORDER BY tagfield,tagsubfield @@ -1100,10 +1100,12 @@ sub GetMarcStructure { my $isurl; my $link; my $defaultvalue; + my $maxlength; while ( ( $tag, $subfield, $liblibrarian, $libopac, $tab, $mandatory, $repeatable, $authorised_value, - $authtypecode, $value_builder, $kohafield, $seealso, $hidden, $isurl, $link, $defaultvalue + $authtypecode, $value_builder, $kohafield, $seealso, $hidden, $isurl, $link, $defaultvalue, + $maxlength ) = $sth->fetchrow ) { @@ -1120,6 +1122,7 @@ sub GetMarcStructure { $res->{$tag}->{$subfield}->{isurl} = $isurl; $res->{$tag}->{$subfield}->{'link'} = $link; $res->{$tag}->{$subfield}->{defaultvalue} = $defaultvalue; + $res->{$tag}->{$subfield}->{maxlength} = $maxlength; } $marc_structure_cache->{$forlibrarian}->{$frameworkcode} = $res; @@ -3465,9 +3468,12 @@ Function exported, but should NOT be used, unless you really know what you're do =cut sub ModBiblioMarc { - - # pass the MARC::Record to this function, and it will create the records in the marc field + # pass the MARC::Record to this function, and it will create the records in + # the marc field my ( $record, $biblionumber, $frameworkcode ) = @_; + + # Clone record as it gets modified + $record = $record->clone(); my $dbh = C4::Context->dbh; my @fields = $record->fields(); if ( !$frameworkcode ) {