Bug 19040: Refactor GetMarcBiblio parameters
Change parameters to a hashref. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Looks good to me. Two calls in migration_tools/22_to_30 still in old style. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
b08913370f
commit
d5986c9b97
|
|
@ -1475,7 +1475,7 @@ sub merge {
|
|||
|
||||
my $counteditedbiblio = 0;
|
||||
foreach my $biblionumber ( @biblionumbers ) {
|
||||
my $marcrecord = GetMarcBiblio( $biblionumber );
|
||||
my $marcrecord = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
next if !$marcrecord;
|
||||
my $update = 0;
|
||||
foreach my $tagfield (@$tags_using_authtype) {
|
||||
|
|
|
|||
34
C4/Biblio.pm
34
C4/Biblio.pm
|
|
@ -293,7 +293,7 @@ sub ModBiblio {
|
|||
}
|
||||
|
||||
if ( C4::Context->preference("CataloguingLog") ) {
|
||||
my $newrecord = GetMarcBiblio($biblionumber);
|
||||
my $newrecord = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio BEFORE=>" . $newrecord->as_formatted );
|
||||
}
|
||||
|
||||
|
|
@ -1136,11 +1136,18 @@ sub GetMarcSubfieldStructureFromKohaField {
|
|||
|
||||
=head2 GetMarcBiblio
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber, [$embeditems], [$opac]);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $embeditems,
|
||||
opac => $opac });
|
||||
|
||||
Returns MARC::Record representing a biblio record, or C<undef> if the
|
||||
biblionumber doesn't exist.
|
||||
|
||||
Both embed_items and opac are optional.
|
||||
If embed_items is passed and is 1, items are embedded.
|
||||
If opac is passed and is 1, the record is filtered as needed.
|
||||
|
||||
=over 4
|
||||
|
||||
=item C<$biblionumber>
|
||||
|
|
@ -1161,9 +1168,16 @@ OpacHiddenItems to be applied.
|
|||
=cut
|
||||
|
||||
sub GetMarcBiblio {
|
||||
my $biblionumber = shift;
|
||||
my $embeditems = shift || 0;
|
||||
my $opac = shift || 0;
|
||||
my ($params) = @_;
|
||||
|
||||
if (not defined $params) {
|
||||
carp 'GetMarcBiblio called without parameters';
|
||||
return;
|
||||
}
|
||||
|
||||
my $biblionumber = $params->{biblionumber};
|
||||
my $embeditems = $params->{embed_items} || 0;
|
||||
my $opac = $params->{opac} || 0;
|
||||
|
||||
if (not defined $biblionumber) {
|
||||
carp 'GetMarcBiblio called with undefined biblionumber';
|
||||
|
|
@ -2181,7 +2195,7 @@ sub PrepHostMarcField {
|
|||
$marcflavour ||="MARC21";
|
||||
|
||||
require C4::Items;
|
||||
my $hostrecord = GetMarcBiblio($hostbiblionumber);
|
||||
my $hostrecord = GetMarcBiblio({ biblionumber => $hostbiblionumber });
|
||||
my $item = C4::Items::GetItem($hostitemnumber);
|
||||
|
||||
my $hostmarcfield;
|
||||
|
|
@ -2830,7 +2844,9 @@ sub ModZebra {
|
|||
);
|
||||
if ( $op eq 'specialUpdate' ) {
|
||||
unless ($record) {
|
||||
$record = GetMarcBiblio($biblionumber, 1);
|
||||
$record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
}
|
||||
my $records = [$record];
|
||||
$indexer->update_index_background( [$biblionumber], [$record] );
|
||||
|
|
@ -3443,7 +3459,7 @@ Generate the host item entry for an analytic child entry
|
|||
sub prepare_host_field {
|
||||
my ( $hostbiblio, $marcflavour ) = @_;
|
||||
$marcflavour ||= C4::Context->preference('marcflavour');
|
||||
my $host = GetMarcBiblio($hostbiblio);
|
||||
my $host = GetMarcBiblio({ biblionumber => $hostbiblio });
|
||||
# unfortunately as_string does not 'do the right thing'
|
||||
# if field returns undef
|
||||
my %sfd;
|
||||
|
|
@ -3581,7 +3597,7 @@ sub UpdateTotalIssues {
|
|||
my ($biblionumber, $increase, $value) = @_;
|
||||
my $totalissues;
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
unless ($record) {
|
||||
carp "UpdateTotalIssues could not get biblio record";
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ sub GetHoldsQueueItems {
|
|||
$sth->execute(@bind_params);
|
||||
my $items = [];
|
||||
while ( my $row = $sth->fetchrow_hashref ){
|
||||
my $record = GetMarcBiblio($row->{biblionumber});
|
||||
my $record = GetMarcBiblio({ biblionumber => $row->{biblionumber} });
|
||||
if ($record){
|
||||
$row->{subtitle} = [ map { $_->{subfield} } @{ GetRecordValue( 'subtitle', $record, '' ) } ];
|
||||
$row->{parts} = GetRecordValue('parts',$record,'')->[0]->{subfield};
|
||||
|
|
|
|||
|
|
@ -214,7 +214,9 @@ sub GetRecords {
|
|||
}
|
||||
|
||||
my $embed_items = 1;
|
||||
my $record = GetMarcBiblio($biblionumber, $embed_items);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $embed_items });
|
||||
if ($record) {
|
||||
$biblioitem->{marcxml} = $record->as_xml_record();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1321,7 +1321,7 @@ references on array of itemnumbers.
|
|||
|
||||
sub get_hostitemnumbers_of {
|
||||
my ($biblionumber) = @_;
|
||||
my $marcrecord = GetMarcBiblio($biblionumber);
|
||||
my $marcrecord = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
return unless $marcrecord;
|
||||
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ sub draw_label_text {
|
|||
my $font = $self->{'font'};
|
||||
my $item = _get_label_item($self->{'item_number'});
|
||||
my $label_fields = _get_text_fields($self->{'format_string'});
|
||||
my $record = GetMarcBiblio($item->{'biblionumber'});
|
||||
my $record = GetMarcBiblio({ biblionumber => $item->{'biblionumber'} });
|
||||
# FIXME - returns all items, so you can't get data from an embedded holdings field.
|
||||
# TODO - add a GetMarcBiblio1item(bibnum,itemnum) or a GetMarcItem(itemnum).
|
||||
my $cn_source = ($item->{'cn_source'} ? $item->{'cn_source'} : C4::Context->preference('DefaultClassificationSource'));
|
||||
|
|
@ -601,7 +601,7 @@ sub csv_data {
|
|||
my $self = shift;
|
||||
my $label_fields = _get_text_fields($self->{'format_string'});
|
||||
my $item = _get_label_item($self->{'item_number'});
|
||||
my $bib_record = GetMarcBiblio($item->{biblionumber});
|
||||
my $bib_record = GetMarcBiblio({ biblionumber => $item->{biblionumber} });
|
||||
my @csv_data = (map { _get_barcode_data($_->{'code'},$item,$bib_record) } @$label_fields);
|
||||
return \@csv_data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ sub marcrecord2csv {
|
|||
my $output;
|
||||
|
||||
# Getting the record
|
||||
my $record = GetMarcBiblio($biblio);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblio });
|
||||
return unless $record;
|
||||
C4::Biblio::EmbedItemsInMarcBiblio( $record, $biblio, $itemnumbers );
|
||||
# Getting the framework
|
||||
|
|
|
|||
|
|
@ -2008,7 +2008,9 @@ sub searchResults {
|
|||
my $hostbiblionumber = $hostfield->subfield("0");
|
||||
my $linkeditemnumber = $hostfield->subfield("9");
|
||||
if(!$hostbiblionumber eq undef){
|
||||
my $hostbiblio = GetMarcBiblio($hostbiblionumber, 1);
|
||||
my $hostbiblio = GetMarcBiblio({
|
||||
biblionumber => $hostbiblionumber,
|
||||
embed_items => 1 });
|
||||
my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostbiblionumber) );
|
||||
if(!$hostbiblio eq undef){
|
||||
my @hostitems = $hostbiblio->field($itemfield);
|
||||
|
|
|
|||
|
|
@ -1485,7 +1485,7 @@ sub NewSubscription {
|
|||
#set serial flag on biblio if not already set.
|
||||
my $biblio = Koha::Biblios->find( $biblionumber );
|
||||
if ( $biblio and !$biblio->serial ) {
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my ( $tag, $subf ) = GetMarcFromKohaField( 'biblio.serial', $biblio->frameworkcode );
|
||||
if ($tag) {
|
||||
eval { $record->field($tag)->update( $subf => 1 ); };
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ sub GetShelfInfo {
|
|||
my $this_biblio = GetBibData($item->{biblionumber});
|
||||
next unless defined $this_biblio;
|
||||
$item->{'title'} = $this_biblio->{'title'};
|
||||
my $this_record = GetMarcBiblio($this_biblio->{'biblionumber'});
|
||||
my $this_record = GetMarcBiblio({ biblionumber => $this_biblio->{'biblionumber'} });
|
||||
$item->{'browser_normalized_upc'} = GetNormalizedUPC($this_record,$marcflavour);
|
||||
$item->{'browser_normalized_oclc'} = GetNormalizedOCLCNumber($this_record,$marcflavour);
|
||||
$item->{'browser_normalized_isbn'} = GetNormalizedISBN(undef,$this_record,$marcflavour);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,11 @@ Keyword to MARC mapping for subtitle must be set for this method to return any p
|
|||
sub subtitles {
|
||||
my ( $self ) = @_;
|
||||
|
||||
return map { $_->{subfield} } @{ C4::Biblio::GetRecordValue( 'subtitle', C4::Biblio::GetMarcBiblio( $self->id ), $self->frameworkcode ) };
|
||||
return map { $_->{subfield} } @{
|
||||
C4::Biblio::GetRecordValue(
|
||||
'subtitle',
|
||||
C4::Biblio::GetMarcBiblio({ biblionumber => $self->id }),
|
||||
$self->frameworkcode ) };
|
||||
}
|
||||
|
||||
=head3 can_article_request
|
||||
|
|
|
|||
|
|
@ -121,7 +121,9 @@ sub get_all_biblios_iterator {
|
|||
while (1) {
|
||||
my $row = $rs->next();
|
||||
return if !$row;
|
||||
my $marc = C4::Biblio::GetMarcBiblio( $row->biblionumber, 1 );
|
||||
my $marc = C4::Biblio::GetMarcBiblio({
|
||||
biblionumber => $row->biblionumber,
|
||||
embed_items => 1 });
|
||||
my $next = eval {
|
||||
__PACKAGE__->new($marc, $row->biblionumber);
|
||||
};
|
||||
|
|
@ -158,7 +160,9 @@ If set to true, item data is embedded in the record. Default is to not do this.
|
|||
sub get_marc_biblio {
|
||||
my ($class, $bibnum, %options) = @_;
|
||||
|
||||
return C4::Biblio::GetMarcBiblio( $bibnum, ($options{item_data} ? 1 : 0 ) );
|
||||
return C4::Biblio::GetMarcBiblio({
|
||||
biblionumber => $bibnum,
|
||||
embed_items => ($options{item_data} ? 1 : 0 ) });
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ sub _get_biblio_for_export {
|
|||
my $export_items = $params->{export_items} // 1;
|
||||
my $only_export_items_for_branch = $params->{only_export_items_for_branch};
|
||||
|
||||
my $record = eval { C4::Biblio::GetMarcBiblio($biblionumber); };
|
||||
my $record = eval { C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber }); };
|
||||
|
||||
return if $@ or not defined $record;
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,10 @@ sub get_biblio_marcxml {
|
|||
if ( my $conf = $self->{conf} ) {
|
||||
$with_items = $conf->{format}->{$format}->{include_items};
|
||||
}
|
||||
my $record = GetMarcBiblio($biblionumber, $with_items, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $with_items,
|
||||
opac => 1 });
|
||||
$record ? $record->as_xml_record() : undef;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ foreach my $biblionumber ( @bibs ) {
|
|||
|
||||
my $dat = &GetBiblioData($biblionumber);
|
||||
next unless $dat;
|
||||
my $record = &GetMarcBiblio($biblionumber);
|
||||
my $record = &GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
$dat->{subtitle} = GetRecordValue('subtitle', $record, $fw);
|
||||
my $marcnotesarray = GetMarcNotes( $record, $marcflavour );
|
||||
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
|
||||
|
|
|
|||
|
|
@ -65,7 +65,9 @@ if ($bib_list && $format) {
|
|||
|
||||
foreach my $biblio (@bibs) {
|
||||
|
||||
my $record = GetMarcBiblio($biblio, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblio,
|
||||
embed_items => 1 });
|
||||
next unless $record;
|
||||
|
||||
if ($format eq 'iso2709') {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,9 @@ if ( $email_add ) {
|
|||
|
||||
my $dat = GetBiblioData($biblionumber);
|
||||
next unless $dat;
|
||||
my $record = GetMarcBiblio($biblionumber, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
|
||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,9 @@ if ( not defined $biblionumber ) {
|
|||
exit;
|
||||
}
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber,1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
|
||||
if ( not defined $record ) {
|
||||
# biblionumber invalid -> report and exit
|
||||
|
|
|
|||
|
|
@ -88,7 +88,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
}
|
||||
);
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
$template->param( ocoins => GetCOinSBiblio($record) );
|
||||
|
||||
if ( not defined $record ) {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user(
|
|||
|
||||
my $biblionumber = $query->param('biblionumber');
|
||||
$biblionumber = HTML::Entities::encode($biblionumber);
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
if ( not defined $record ) {
|
||||
# biblionumber invalid -> report and exit
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ if ($op eq "export") {
|
|||
my $biblionumber = $query->param("bib");
|
||||
if ($biblionumber){
|
||||
|
||||
my $marc = GetMarcBiblio($biblionumber, 1);
|
||||
my $marc = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
|
||||
if ($format =~ /endnote/) {
|
||||
$marc = marc2endnote($marc);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
}
|
||||
);
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
if ( not defined $record ) {
|
||||
# biblionumber invalid -> report and exit
|
||||
$template->param( unknownbiblionumber => 1,
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ for my $itm (@all_items) {
|
|||
($itemnumber != $itm->{itemnumber}));
|
||||
}
|
||||
|
||||
my $record=GetMarcBiblio($biblionumber);
|
||||
my $record=GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
my $hostrecords;
|
||||
# adding items linked via host biblios
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ if ($importid) {
|
|||
$record = C4::ImportBatch::GetRecordFromImportBiblio( $importid, 'embed_items' );
|
||||
}
|
||||
else {
|
||||
$record =GetMarcBiblio($biblionumber);
|
||||
$record =GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
}
|
||||
if(!ref $record) {
|
||||
print $input->redirect("/cgi-bin/koha/errors/404.pl");
|
||||
|
|
|
|||
|
|
@ -770,7 +770,7 @@ my (
|
|||
);
|
||||
|
||||
if (($biblionumber) && !($breedingid)){
|
||||
$record = GetMarcBiblio($biblionumber);
|
||||
$record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
}
|
||||
if ($breedingid) {
|
||||
( $record, $encoding ) = MARCfindbreeding( $breedingid ) ;
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ $restrictededition = 0 if ($restrictededition != 0 && C4::Context->IsSuperLibra
|
|||
$restrictededition = 0 if ($restrictededition != 0 && $frameworkcode eq 'FA' && haspermission($uid, {'editcatalogue' => 'fast_cataloging'}));
|
||||
|
||||
my $tagslib = &GetMarcStructure(1,$frameworkcode);
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my $oldrecord = TransformMarcToKoha($record);
|
||||
my $itemrecord;
|
||||
my $nextop="additem";
|
||||
|
|
@ -724,7 +724,7 @@ if ($op eq "additem") {
|
|||
#-------------------------------------------------------------------------------
|
||||
|
||||
# now, build existiing item list
|
||||
my $temp = GetMarcBiblio( $biblionumber );
|
||||
my $temp = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
#my @fields = $record->fields();
|
||||
|
||||
|
||||
|
|
@ -748,7 +748,9 @@ if ( C4::Context->preference('EasyAnalyticalRecords') ) {
|
|||
foreach my $hostfield ($temp->field($analyticfield)){
|
||||
my $hostbiblionumber = $hostfield->subfield('0');
|
||||
if ($hostbiblionumber){
|
||||
my $hostrecord = GetMarcBiblio($hostbiblionumber, 1);
|
||||
my $hostrecord = GetMarcBiblio({
|
||||
biblionumber => $hostbiblionumber,
|
||||
embed_items => 1 });
|
||||
if ($hostrecord) {
|
||||
my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostbiblionumber) );
|
||||
foreach my $hostitem ($hostrecord->field($itemfield)){
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user(
|
|||
}
|
||||
);
|
||||
|
||||
my $biblio = GetMarcBiblio($biblionumber);
|
||||
my $biblio = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my $marcflavour = C4::Context->preference("marcflavour");
|
||||
$marcflavour ||="MARC21";
|
||||
if ($marcflavour eq 'MARC21' || $marcflavour eq 'NORMARC') {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ if ($merge) {
|
|||
}
|
||||
|
||||
# Rewriting the leader
|
||||
$record->leader(GetMarcBiblio($ref_biblionumber)->leader());
|
||||
$record->leader(GetMarcBiblio({ biblionumber => $ref_biblionumber })->leader());
|
||||
|
||||
my $frameworkcode = $input->param('frameworkcode');
|
||||
my @notmoveditems;
|
||||
|
|
@ -115,7 +115,7 @@ if ($merge) {
|
|||
my $report_header = {};
|
||||
foreach my $biblionumber ($ref_biblionumber, @biblionumbers) {
|
||||
# build report
|
||||
my $marcrecord = GetMarcBiblio($biblionumber);
|
||||
my $marcrecord = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my %report_record = (
|
||||
biblionumber => $biblionumber,
|
||||
fields => {},
|
||||
|
|
@ -202,7 +202,7 @@ if ($merge) {
|
|||
# Creating a loop for display
|
||||
my @records;
|
||||
foreach my $biblionumber (@biblionumbers) {
|
||||
my $marcrecord = GetMarcBiblio($biblionumber);
|
||||
my $marcrecord = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my $frameworkcode = GetFrameworkCode($biblionumber);
|
||||
my $recordObj = new Koha::MetadataRecord({'record' => $marcrecord, schema => $marcflavour});
|
||||
my $record = {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ my $launcher = sub {
|
|||
);
|
||||
|
||||
#get marc record
|
||||
$marcrecord = GetMarcBiblio($biblionumber);
|
||||
$marcrecord = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
my $subfield_value_9 = $biblionumber;
|
||||
my $subfield_value_0 = $biblionumber;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ sub plugin {
|
|||
);
|
||||
|
||||
#get marc record
|
||||
$marcrecord = GetMarcBiblio($biblionumber);
|
||||
$marcrecord = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
my $subfield_value_9 = $biblionumber;
|
||||
my $subfield_value_0;
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
|
|||
# now display infos
|
||||
foreach my $num (@getoverdues) {
|
||||
my %overdueforbranch;
|
||||
my $record = GetMarcBiblio($num->{biblionumber});
|
||||
my $record = GetMarcBiblio({ biblionumber => $num->{biblionumber} });
|
||||
if ($record){
|
||||
$overdueforbranch{'subtitle'} = GetRecordValue('subtitle',$record,'')->[0]->{subfield};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ while ( my $data = $sth->fetchrow_hashref ) {
|
|||
my $thisratio = $data->{reservecount} / $data->{itemcount};
|
||||
my $ratiocalc = ($thisratio / $ratio);
|
||||
($thisratio / $ratio) >= 1 or next; # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause
|
||||
my $record = GetMarcBiblio($data->{biblionumber});
|
||||
my $record = GetMarcBiblio({ biblionumber => $data->{biblionumber} });
|
||||
$data->{subtitle} = GetRecordValue('subtitle', $record, GetFrameworkCode($data->{biblionumber}));
|
||||
push(
|
||||
@reservedata,
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ while ( my $library = $libraries->next ) {
|
|||
itemcallnumber => $item->itemcallnumber,
|
||||
);
|
||||
|
||||
my $record = GetMarcBiblio($biblio->biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblio->biblionumber });
|
||||
$getransf{'subtitle'} = GetRecordValue('subtitle', $record, $biblio->frameworkcode);
|
||||
|
||||
# we check if we have a reserv for this transfer
|
||||
|
|
|
|||
|
|
@ -113,7 +113,10 @@ foreach my $num (@getreserves) {
|
|||
|
||||
$getreserv{'itemtype'} = $itemtype->description; # FIXME Should not it be translated_description?
|
||||
$getreserv{'title'} = $biblio->title;
|
||||
$getreserv{'subtitle'} = GetRecordValue('subtitle', GetMarcBiblio($biblio->biblionumber), $biblio->frameworkcode);
|
||||
$getreserv{'subtitle'} = GetRecordValue(
|
||||
'subtitle',
|
||||
GetMarcBiblio({ biblionumber => $biblio->biblionumber }),
|
||||
$biblio->frameworkcode);
|
||||
$getreserv{'biblionumber'} = $biblio->biblionumber;
|
||||
$getreserv{'barcode'} = $item->barcode;
|
||||
$getreserv{'homebranch'} = $homebranch;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ $sth->execute;
|
|||
my @errors;
|
||||
while (my ($biblionumber)= $sth->fetchrow) {
|
||||
#now, parse the record, extract the item fields, and store them in somewhere else.
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
if (not defined $record) {
|
||||
push @errors, $biblionumber;
|
||||
next;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@ $sth->execute();
|
|||
while ( my ( $biblionumber, $biblioitemnumber, $frameworkcode ) = $sth->fetchrow ) {
|
||||
$count++;
|
||||
warn $count unless $count % 1000;
|
||||
my $record = GetMarcBiblio( $biblionumber, 1 );
|
||||
my $record = GetMarcBiblio({
|
||||
biblionummber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
unless ($record) { push @errors, "bad record biblionumber $biblionumber"; next; }
|
||||
|
||||
unless ($test_parameter) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ my $sth=$dbh->prepare("SELECT biblio.biblionumber, biblioitemnumber, frameworkco
|
|||
$sth->execute();
|
||||
|
||||
while (my ($biblionumber,$biblioitemnumber,$frameworkcode)=$sth->fetchrow ){
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
C4::Biblio::_koha_marc_update_bib_ids($record, $frameworkcode, $biblionumber, $biblioitemnumber);
|
||||
my $biblionumber = eval {ModBiblioMarc( $record, $biblionumber, $frameworkcode )};
|
||||
if($@){
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ while ((my ($biblionumber)= $sth->fetchrow)) {
|
|||
#now, parse the record, extract the item fields, and store them in somewhere else.
|
||||
my $Koharecord;
|
||||
eval{
|
||||
$Koharecord = GetMarcBiblio($biblionumber);
|
||||
$Koharecord = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
};
|
||||
if($@){
|
||||
warn 'pb when getting biblio '.$i.' : '.$@;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ sub check_all_url {
|
|||
cb => sub {
|
||||
return if $count > $maxconn;
|
||||
while ( my ($biblionumber) = $sth->fetchrow ) {
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
for my $tag (@tags) {
|
||||
foreach my $field ( $record->field($tag) ) {
|
||||
my $url = $field->subfield('u');
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ sub check_biblio {
|
|||
my $host = $self->{ host_default };
|
||||
my $bad_url = $self->{ bad_url };
|
||||
|
||||
my $record = GetMarcBiblio( $biblionumber );
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
return unless $record->field('856');
|
||||
|
||||
my @urls = ();
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ sub process_bib {
|
|||
my $linker = shift;
|
||||
my $biblionumber = shift;
|
||||
|
||||
my $bib = GetMarcBiblio($biblionumber);
|
||||
my $bib = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
unless ( defined $bib ) {
|
||||
print
|
||||
"\nCould not retrieve bib $biblionumber from the database - record is corrupt.\n";
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ my $sth_prepared;
|
|||
|
||||
sub updateMarc {
|
||||
my $id = shift;
|
||||
my $biblio = GetMarcBiblio($id);
|
||||
my $biblio = GetMarcBiblio({ biblionumber => $id });
|
||||
|
||||
unless ($biblio) {
|
||||
$debug and warn '[ERROR] GetMarcBiblio did not return any biblio.';
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use Koha::RecordProcessor;
|
|||
use Data::Dumper;
|
||||
use C4::Biblio;
|
||||
|
||||
my $record = GetMarcBiblio($ARGV[0]);
|
||||
my $record = GetMarcBiblio({ biblionumber => $ARGV[0] });
|
||||
|
||||
print "Before: " . $record->as_formatted() . "\n";
|
||||
my $processor = Koha::RecordProcessor->new( { filters => ( $ARGV[1] ) });
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ while (my $biblionumber = $query->fetchrow){
|
|||
$count++;
|
||||
print "." unless $silent;
|
||||
print "\r$count" unless ($silent or ($count % 100));
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
if ($record) {
|
||||
ModBiblio($record, $biblionumber, GetFrameworkCode($biblionumber)) ;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ for my $biblionumber (@biblionumbers) {
|
|||
say " skipping. ERROR: Invalid biblionumber." if $verbose;
|
||||
next;
|
||||
}
|
||||
my $record = C4::Biblio::GetMarcBiblio($biblionumber);
|
||||
my $record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
unless ($record) {
|
||||
say " skipping. ERROR: Invalid record." if $verbose;
|
||||
next;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ $sth1->execute();
|
|||
|
||||
# fetch info from the search
|
||||
while (my ($biblionumber, $frameworkcode) = $sth1->fetchrow_array){
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
my $modok = ModBiblio($record, $biblionumber, $frameworkcode);
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ my %alreadydone;
|
|||
my $counter;
|
||||
my %hash;
|
||||
while (my ($bibid) = $sth->fetchrow) {
|
||||
my $record = GetMarcBiblio($bibid);
|
||||
my $record = GetMarcBiblio({ biblionumber => $bibid });
|
||||
my $isbnField = $record->field('010');
|
||||
next unless $isbnField;
|
||||
my $isbn=$isbnField->subfield('a');
|
||||
|
|
@ -182,8 +182,8 @@ exit;
|
|||
# # OK, on garde la notice d'autorit<69> on cherche les notices biblio et on les met <20>jour...
|
||||
# if ($fieldnumber eq '710') {
|
||||
# $sthBIBLIOS710->execute($authentry);
|
||||
# while (my ($bibid,$tag,$tagorder,$subfieldorder) = $sthBIBLIOS710->fetchrow) {
|
||||
# my $inbiblio = GetMarcBiblio($bibid);
|
||||
# while (my ($bibid,$tag,$tagorder,$subfieldorder) = $sthBIBLIOS710->fetchrow) {
|
||||
# my $inbiblio = GetMarcBiblio({ biblionumber => $bibid });
|
||||
# my $isOK = 0;
|
||||
# foreach my $in7xx ($inbiblio->field($fieldnumber)) {
|
||||
# # !!!!! ici, il faut reconstruire l'entr<74> de la table de hachage comme ci dessus
|
||||
|
|
@ -203,7 +203,7 @@ exit;
|
|||
# if ($fieldnumber eq '711') {
|
||||
# $sthBIBLIOS711->execute($authentry);
|
||||
# while (my ($bibid,$tag,$tagorder,$subfieldorder) = $sthBIBLIOS711->fetchrow) {
|
||||
# my $inbiblio = GetMarcBiblio($bibid);
|
||||
# my $inbiblio = GetMarcBiblio({ biblionumber => $bibid });
|
||||
# my $isOK = 0;
|
||||
# foreach my $in7xx ($inbiblio->field($fieldnumber)) {
|
||||
# # !!!!! ici, il faut reconstruire l'entr<74> de la table de hachage comme ci dessus
|
||||
|
|
@ -223,7 +223,7 @@ exit;
|
|||
# if ($fieldnumber eq '712') {
|
||||
# $sthBIBLIOS712->execute($authentry);
|
||||
# while (my ($bibid,$tag,$tagorder,$subfieldorder) = $sthBIBLIOS712->fetchrow) {
|
||||
# my $inbiblio = GetMarcBiblio($bibid);
|
||||
# my $inbiblio = GetMarcBiblio({ biblionumber => $bibid });
|
||||
# my $isOK = 0;
|
||||
# foreach my $in7xx ($inbiblio->field($fieldnumber)) {
|
||||
# # !!!!! ici, il faut reconstruire l'entr<74> de la table de hachage comme ci dessus
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ _SUMMARY_
|
|||
sub process_bib {
|
||||
my $biblionumber = shift;
|
||||
|
||||
my $bib = GetMarcBiblio($biblionumber);
|
||||
my $bib = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
unless (defined $bib) {
|
||||
print "\nCould not retrieve bib $biblionumber from the database - record is corrupt.\n";
|
||||
$num_bad_bibs++;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ while ( my $row = $csv->getline_hr($fh) ) {
|
|||
|
||||
foreach my $biblionumber (@biblionumbers) {
|
||||
$counter++;
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
if ($verbose) {
|
||||
say "Found matching record! Biblionumber: $biblionumber";
|
||||
|
|
|
|||
|
|
@ -675,7 +675,7 @@ sub get_raw_marc_record {
|
|||
|
||||
my $marc;
|
||||
if ($record_type eq 'biblio') {
|
||||
eval { $marc = GetMarcBiblio($record_number, 1); };
|
||||
eval { $marc = GetMarcBiblio({ biblionumber => $record_number, embed_items => 1 }); };
|
||||
if ($@ || !$marc) {
|
||||
# here we do warn since catching an exception
|
||||
# means that the bib was found but failed
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ while ( my ( $biblionumber ) = $bibs_sth->fetchrow ) {
|
|||
my ( @newfields );
|
||||
|
||||
# Get biblio marc
|
||||
my $biblio = GetMarcBiblio( $biblionumber );
|
||||
my $biblio = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
foreach my $field ( $biblio->field( '440' ) ) {
|
||||
my @newsubfields;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ my $rqitemnumber=$dbh->prepare("SELECT itemnumber, biblionumber from items where
|
|||
$rqbiblios->execute;
|
||||
$|=1;
|
||||
while (my ($biblionumber)= $rqbiblios->fetchrow_array){
|
||||
my $record=GetMarcBiblio($biblionumber);
|
||||
my $record=GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
foreach my $itemfield ($record->field('995')){
|
||||
my $marcitem=MARC::Record->new();
|
||||
$marcitem->encoding('UTF-8');
|
||||
|
|
|
|||
|
|
@ -93,7 +93,9 @@ if (scalar @items >= 1) {
|
|||
}
|
||||
}
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber,1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
if ( ! $record ) {
|
||||
print $query->redirect("/cgi-bin/koha/errors/404.pl");
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,9 @@ if ( ! $biblionumber ) {
|
|||
exit;
|
||||
}
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
if ( ! $record ) {
|
||||
print $query->redirect("/cgi-bin/koha/errors/404.pl");
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ foreach my $biblionumber ( @bibs ) {
|
|||
my $dat = &GetBiblioData($biblionumber);
|
||||
next unless $dat;
|
||||
|
||||
my $record = &GetMarcBiblio( $biblionumber );
|
||||
my $record = &GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my $framework = &GetFrameworkCode( $biblionumber );
|
||||
$record_processor->options({
|
||||
interface => 'opac',
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ if (scalar @all_items >= 1) {
|
|||
}
|
||||
}
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
if ( ! $record ) {
|
||||
print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@ if ($bib_list && $format) {
|
|||
});
|
||||
foreach my $biblio (@bibs) {
|
||||
|
||||
my $record = GetMarcBiblio($biblio, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblio,
|
||||
embed_items => 1 });
|
||||
my $framework = &GetFrameworkCode( $biblio );
|
||||
$record_processor->options({
|
||||
interface => 'opac',
|
||||
|
|
|
|||
|
|
@ -81,7 +81,9 @@ if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
|
|||
while ( my $content = $contents->next ) {
|
||||
my $biblionumber = $content->biblionumber;
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
my $framework = &GetFrameworkCode( $biblionumber );
|
||||
$record_processor->options({
|
||||
interface => 'opac',
|
||||
|
|
|
|||
|
|
@ -36,8 +36,11 @@ $biblionumber = int($biblionumber);
|
|||
my $error = q{};
|
||||
|
||||
my $include_items = ($format =~ /bibtex/) ? 0 : 1;
|
||||
my $marc = GetMarcBiblio($biblionumber, $include_items)
|
||||
if $biblionumber;
|
||||
my $marc = $biblionumber
|
||||
? GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $include_items })
|
||||
: undef;
|
||||
|
||||
if(!$marc) {
|
||||
print $query->redirect("/cgi-bin/koha/errors/404.pl");
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ foreach my $biblioNumber (@biblionumbers) {
|
|||
|
||||
my @itemInfos = GetItemsInfo($biblioNumber);
|
||||
|
||||
my $marcrecord= GetMarcBiblio($biblioNumber);
|
||||
my $marcrecord= GetMarcBiblio({ biblionumber => $biblioNumber });
|
||||
|
||||
# flag indicating existence of at least one item linked via a host record
|
||||
my $hostitemsflag;
|
||||
|
|
@ -401,7 +401,7 @@ $template->param('item_level_itypes' => $itemLevelTypes);
|
|||
foreach my $biblioNum (@biblionumbers) {
|
||||
|
||||
my @not_available_at = ();
|
||||
my $record = GetMarcBiblio($biblioNum);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblioNum });
|
||||
# Init the bib item with the choices for branch pickup
|
||||
my %biblioLoopIter;
|
||||
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ for (my $i=0;$i<@servers;$i++) {
|
|||
}
|
||||
|
||||
if (C4::Context->preference('COinSinOPACResults')) {
|
||||
my $record = GetMarcBiblio($res->{'biblionumber'});
|
||||
my $record = GetMarcBiblio({ biblionumber => $res->{'biblionumber'} });
|
||||
$res->{coins} = GetCOinSBiblio($record);
|
||||
}
|
||||
if ( C4::Context->preference( "Babeltheque" ) and $res->{normalized_isbn} ) {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,9 @@ if ( $email_add ) {
|
|||
|
||||
my $dat = GetBiblioData($biblionumber);
|
||||
next unless $dat;
|
||||
my $record = GetMarcBiblio($biblionumber, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
|
||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,9 @@ if ( $email ) {
|
|||
my $biblionumber = $content->biblionumber;
|
||||
my $fw = GetFrameworkCode($biblionumber);
|
||||
my $dat = GetBiblioData($biblionumber);
|
||||
my $record = GetMarcBiblio($biblionumber, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
|
||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||
my $subtitle = GetRecordValue('subtitle', $record, $fw);
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ if ( $op eq 'view' ) {
|
|||
while ( my $content = $contents->next ) {
|
||||
my $biblionumber = $content->biblionumber;
|
||||
my $this_item = GetBiblioData($biblionumber);
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my $framework = GetFrameworkCode( $biblionumber );
|
||||
$record_processor->options({
|
||||
interface => 'opac',
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ if ($importid) {
|
|||
$record = MARC::Record->new_from_usmarc($marc);
|
||||
}
|
||||
else {
|
||||
$record = GetMarcBiblio($biblionumber);
|
||||
$record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my $framework = GetFrameworkCode($biblionumber);
|
||||
$record_processor->options({
|
||||
interface => 'opac',
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ for my $result (@$reviews){
|
|||
my $biblionumber = $result->{biblionumber};
|
||||
my $biblio = Koha::Biblios->find( $biblionumber );
|
||||
my $biblioitem = $biblio->biblioitem;
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my $frameworkcode = GetFrameworkCode($biblionumber);
|
||||
my $borr = Koha::Patrons->find( $result->{borrowernumber} )->unblessed;
|
||||
$result->{normalized_upc} = GetNormalizedUPC($record,$marcflavour);
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ if ($loggedinuser) {
|
|||
my $my_approved_tags = get_approval_rows({ approved => 1 });
|
||||
foreach my $tag (@$my_tags) {
|
||||
my $biblio = Koha::Biblios->find( $tag->{biblionumber} );
|
||||
my $record = &GetMarcBiblio( $tag->{biblionumber} );
|
||||
my $record = &GetMarcBiblio({ biblionumber => $tag->{biblionumber} });
|
||||
$tag->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $tag->{biblionumber} ) );
|
||||
$tag->{title} = $biblio->title;
|
||||
$tag->{author} = $biblio->author;
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ if ($issues){
|
|||
}
|
||||
$issue->{'charges'} = $charges;
|
||||
$issue->{'rentalfines'} = $rentalfines;
|
||||
my $marcrecord = GetMarcBiblio( $issue->{'biblionumber'} );
|
||||
my $marcrecord = GetMarcBiblio({ biblionumber => $issue->{'biblionumber'} });
|
||||
$issue->{'subtitle'} = GetRecordValue('subtitle', $marcrecord, GetFrameworkCode($issue->{'biblionumber'}));
|
||||
# check if item is renewable
|
||||
my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
|
||||
|
|
|
|||
|
|
@ -439,7 +439,9 @@ sub redirect_mod_subscription {
|
|||
|
||||
sub insert_additional_fields {
|
||||
my ( $additional_fields, $biblionumber, $subscriptionid ) = @_;
|
||||
my $record = GetMarcBiblio( $biblionumber, 1 );
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
for my $field ( @$additional_fields ) {
|
||||
my $af = Koha::AdditionalField->new({ id => $field->{id} })->fetch;
|
||||
if ( $af->{marcfield} ) {
|
||||
|
|
|
|||
11
svc/bib
11
svc/bib
|
|
@ -66,7 +66,9 @@ exit 0;
|
|||
sub fetch_bib {
|
||||
my $query = shift;
|
||||
my $biblionumber = shift;
|
||||
my $record = GetMarcBiblio( $biblionumber, $query->url_param('items') );
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $query->url_param('items') });
|
||||
if (defined $record) {
|
||||
print $query->header(-type => 'text/xml',-charset => 'utf-8',);
|
||||
print $record->as_xml_record();
|
||||
|
|
@ -78,7 +80,7 @@ sub fetch_bib {
|
|||
sub update_bib {
|
||||
my $query = shift;
|
||||
my $biblionumber = shift;
|
||||
my $old_record = GetMarcBiblio($biblionumber);
|
||||
my $old_record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
unless (defined $old_record) {
|
||||
print $query->header(-type => 'text/xml', -status => '404 Not Found');
|
||||
return;
|
||||
|
|
@ -113,8 +115,9 @@ sub update_bib {
|
|||
}
|
||||
|
||||
ModBiblio( $record, $biblionumber, '' );
|
||||
my $new_record =
|
||||
GetMarcBiblio( $biblionumber, $query->url_param('items') );
|
||||
my $new_record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $query->url_param('items') });
|
||||
|
||||
$result->{'status'} = "ok";
|
||||
$result->{'biblionumber'} = $biblionumber;
|
||||
|
|
|
|||
|
|
@ -209,8 +209,10 @@ while ( my $c = $sth->fetchrow_hashref() ) {
|
|||
as_due_date => 1
|
||||
}
|
||||
),
|
||||
subtitle =>
|
||||
GetRecordValue( 'subtitle', GetMarcBiblio( $c->{biblionumber} ), GetFrameworkCode( $c->{biblionumber} ) ),
|
||||
subtitle => GetRecordValue(
|
||||
'subtitle',
|
||||
GetMarcBiblio({ biblionumber => $c->{biblionumber} }),
|
||||
GetFrameworkCode( $c->{biblionumber} ) ),
|
||||
lost => $lost,
|
||||
damaged => $damaged,
|
||||
borrower => {
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ while ( my $h = $holds_rs->next() ) {
|
|||
priority => $h->priority(),
|
||||
itemtype_limit => $itemtype_limit,
|
||||
subtitle => GetRecordValue(
|
||||
'subtitle', GetMarcBiblio($biblionumber),
|
||||
'subtitle',
|
||||
GetMarcBiblio({ biblionumber => $biblionumber }),
|
||||
GetFrameworkCode($biblionumber)
|
||||
),
|
||||
reservedate_formatted => $h->reservedate() ? output_pref(
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ sub add_bib {
|
|||
$record->delete_field($field);
|
||||
}
|
||||
my ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, '' );
|
||||
my $new_record = GetMarcBiblio($biblionumber);
|
||||
my $new_record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
if ( $query->url_param('items') ) {
|
||||
foreach my $field ( $fullrecord->field($itemtag) ) {
|
||||
my $one_item_record = $new_record->clone();
|
||||
|
|
@ -84,8 +84,9 @@ sub add_bib {
|
|||
}
|
||||
}
|
||||
|
||||
$new_record =
|
||||
GetMarcBiblio( $biblionumber, $query->url_param('items') );
|
||||
$new_record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => $query->url_param('items') });
|
||||
$result->{'status'} = "ok";
|
||||
$result->{'biblionumber'} = $biblionumber;
|
||||
my $xml = $new_record->as_xml_record();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ my $mmtid = $query->param('mmtid'); # Marc modification template id
|
|||
|
||||
my $record;
|
||||
if ( $record_type eq 'biblio' ) {
|
||||
$record = GetMarcBiblio( $record_id );
|
||||
$record = GetMarcBiblio({ biblionumber => $record_id });
|
||||
} else {
|
||||
my $authority = Koha::MetadataRecord::Authority->get_from_authid( $record_id );
|
||||
$record = $authority->record;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use Module::Load::Conditional qw/check_install/;
|
|||
|
||||
BEGIN {
|
||||
if ( check_install( module => 'Test::DBIx::Class' ) ) {
|
||||
plan tests => 46;
|
||||
plan tests => 47;
|
||||
} else {
|
||||
plan skip_all => "Need Test::DBIx::Class"
|
||||
}
|
||||
|
|
@ -181,6 +181,10 @@ warning_is { $ret = RemoveAllNsb() }
|
|||
ok( !defined $ret, 'RemoveAllNsb returns undef if not passed rec');
|
||||
|
||||
warning_is { $ret = GetMarcBiblio() }
|
||||
{ carped => 'GetMarcBiblio called without parameters'},
|
||||
"GetMarcBiblio returns carped warning on no parameters";
|
||||
|
||||
warning_is { $ret = GetMarcBiblio({ biblionumber => undef }) }
|
||||
{ carped => 'GetMarcBiblio called with undefined biblionumber'},
|
||||
"GetMarcBiblio returns carped warning on undef biblionumber";
|
||||
|
||||
|
|
|
|||
|
|
@ -94,13 +94,13 @@ subtest 'Test merge A1 to A2 (within same authtype)' => sub {
|
|||
is( $rv, 1, 'We expect one biblio record (out of two) to be updated' );
|
||||
|
||||
# Check the results
|
||||
my $newbiblio1 = GetMarcBiblio($biblionumber1);
|
||||
my $newbiblio1 = GetMarcBiblio({ biblionumber => $biblionumber1 });
|
||||
compare_fields( $biblio1, $newbiblio1, {}, 'count' );
|
||||
compare_fields( $biblio1, $newbiblio1, {}, 'order' );
|
||||
is( $newbiblio1->subfield('609', '9'), $authid1, 'Check biblio1 609$9' );
|
||||
is( $newbiblio1->subfield('609', 'a'), 'George Orwell',
|
||||
'Check biblio1 609$a' );
|
||||
my $newbiblio2 = GetMarcBiblio($biblionumber2);
|
||||
my $newbiblio2 = GetMarcBiblio({ biblionumber => $biblionumber2 });
|
||||
compare_fields( $biblio2, $newbiblio2, {}, 'count' );
|
||||
compare_fields( $biblio2, $newbiblio2, {}, 'order' );
|
||||
is( $newbiblio2->subfield('609', '9'), $authid1, 'Check biblio2 609$9' );
|
||||
|
|
@ -138,11 +138,11 @@ subtest 'Test merge A1 to modified A1, test strict mode' => sub {
|
|||
is( $rv, 2, 'Both records are updated now' );
|
||||
|
||||
#Check the results
|
||||
my $biblio1 = GetMarcBiblio($biblionumber1);
|
||||
my $biblio1 = GetMarcBiblio({ biblionumber => $biblionumber1 });
|
||||
compare_fields( $MARC1, $biblio1, {}, 'count' );
|
||||
compare_fields( $MARC1, $biblio1, {}, 'order' );
|
||||
is( $auth1new->field(109)->subfield('a'), $biblio1->field(109)->subfield('a'), 'Record1 values updated correctly' );
|
||||
my $biblio2 = GetMarcBiblio( $biblionumber2 );
|
||||
my $biblio2 = GetMarcBiblio({ biblionumber => $biblionumber2 });
|
||||
compare_fields( $MARC2, $biblio2, {}, 'count' );
|
||||
compare_fields( $MARC2, $biblio2, {}, 'order' );
|
||||
is( $auth1new->field(109)->subfield('a'), $biblio2->field(109)->subfield('a'), 'Record2 values updated correctly' );
|
||||
|
|
@ -154,7 +154,7 @@ subtest 'Test merge A1 to modified A1, test strict mode' => sub {
|
|||
ModBiblio( $MARC1, $biblionumber1, '' );
|
||||
@linkedrecords = ( $biblionumber1 );
|
||||
$rv = C4::AuthoritiesMarc::merge({ mergefrom => $authid1, MARCfrom => $auth1old, mergeto => $authid1, MARCto => $auth1new });
|
||||
$biblio1 = GetMarcBiblio($biblionumber1);
|
||||
$biblio1 = GetMarcBiblio({ biblionumber => $biblionumber1 });
|
||||
is( $biblio1->field(109)->subfield('b'), undef, 'Subfield overwritten in strict mode' );
|
||||
compare_fields( $MARC1, $biblio1, { 609 => 1 }, 'count' );
|
||||
my @old609 = $MARC1->field('609');
|
||||
|
|
@ -195,7 +195,7 @@ subtest 'Test merge A1 to B1 (changing authtype)' => sub {
|
|||
MARC::Field->new( '612', '', '', a => 'unrelated', 9 => 'other' ),
|
||||
);
|
||||
my ( $biblionumber ) = C4::Biblio::AddBiblio( $marc, '' );
|
||||
my $oldbiblio = C4::Biblio::GetMarcBiblio( $biblionumber );
|
||||
my $oldbiblio = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
# Time to merge
|
||||
@linkedrecords = ( $biblionumber );
|
||||
|
|
@ -203,7 +203,7 @@ subtest 'Test merge A1 to B1 (changing authtype)' => sub {
|
|||
is( $retval, 1, 'We touched only one biblio' );
|
||||
|
||||
# Get new marc record for compares
|
||||
my $newbiblio = C4::Biblio::GetMarcBiblio( $biblionumber );
|
||||
my $newbiblio = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
compare_fields( $oldbiblio, $newbiblio, {}, 'count' );
|
||||
# Exclude 109/609 and 112/612 in comparing order
|
||||
my $excl = { '109' => 1, '112' => 1, '609' => 1, '612' => 1 };
|
||||
|
|
@ -260,7 +260,7 @@ subtest 'Merging authorities should handle deletes (BZ 18070)' => sub {
|
|||
DelAuthority({ authid => $authid1 }); # this triggers a merge call
|
||||
|
||||
# See what happened in the biblio record
|
||||
my $marc1 = C4::Biblio::GetMarcBiblio( $biblionumber );
|
||||
my $marc1 = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
is( $marc1->field('609'), undef, 'Field 609 should be gone too' );
|
||||
|
||||
# Now we simulate the delete as done in the cron job
|
||||
|
|
@ -282,7 +282,7 @@ subtest 'Merging authorities should handle deletes (BZ 18070)' => sub {
|
|||
$mocks->{auth_mod}->unmock_all;
|
||||
merge({ mergefrom => $authid1, biblionumbers => [ $biblionumber ] });
|
||||
# Final check
|
||||
$marc1 = C4::Biblio::GetMarcBiblio( $biblionumber );
|
||||
$marc1 = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
is( $marc1->field('609'), undef, 'Merge removed the 609 again even after deleting the authority record' );
|
||||
};
|
||||
|
||||
|
|
@ -306,14 +306,14 @@ subtest "Test some specific postponed merge issues" => sub {
|
|||
# This proves the !authtypefrom condition in sub merge
|
||||
# Additionally, we test clearing subfield
|
||||
merge({ mergefrom => $id + 1, MARCfrom => $oldauthmarc, mergeto => $id, MARCto => $authmarc, biblionumbers => [ $biblionumber ] });
|
||||
$biblio = C4::Biblio::GetMarcBiblio( $biblionumber );
|
||||
$biblio = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
is( $biblio->subfield('609', '9'), $id, '612 moved to 609' );
|
||||
is( $biblio->subfield('609', 'c'), undef, '609c cleared correctly' );
|
||||
|
||||
# Merge A to B postponed, delete B immediately (hits B < hits A)
|
||||
# This proves the !@record_to test in sub merge
|
||||
merge({ mergefrom => $id + 2, mergeto => $id + 1, MARCto => undef, biblionumbers => [ $biblionumber ] });
|
||||
$biblio = C4::Biblio::GetMarcBiblio( $biblionumber );
|
||||
$biblio = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
is( $biblio->field('612'), undef, 'Last 612 must be gone' );
|
||||
|
||||
# Show that we 'need' skip_merge; this example is far-fetched.
|
||||
|
|
@ -325,7 +325,7 @@ subtest "Test some specific postponed merge issues" => sub {
|
|||
my $restored_mocks = set_mocks();
|
||||
DelAuthority({ authid => $id, skip_merge => 1 }); # delete A
|
||||
$restored_mocks->{auth_mod}->unmock_all;
|
||||
$biblio = C4::Biblio::GetMarcBiblio( $biblionumber );
|
||||
$biblio = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
is( $biblio->subfield('109', '9'), $id, 'If the 109 is no longer present, another modify merge would not bring it back' );
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ sub run_tests {
|
|||
'(GetBiblioData) Title field is empty in fresh biblio.');
|
||||
|
||||
my ( $isbn_field, $isbn_subfield ) = get_isbn_field();
|
||||
my $marc = GetMarcBiblio( $biblionumber );
|
||||
my $marc = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
is( $marc->subfield( $isbn_field, $isbn_subfield ), $isbn, );
|
||||
|
||||
# Add title
|
||||
|
|
@ -131,7 +131,7 @@ sub run_tests {
|
|||
is( $data->{ title }, $title,
|
||||
'ModBiblio correctly added the title field, and GetBiblioData.');
|
||||
is( $data->{ isbn }, $isbn, '(ModBiblio) ISBN is still there after ModBiblio.');
|
||||
$marc = GetMarcBiblio( $biblionumber );
|
||||
$marc = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
my ( $title_field, $title_subfield ) = get_title_field();
|
||||
is( $marc->subfield( $title_field, $title_subfield ), $title, );
|
||||
|
||||
|
|
@ -253,7 +253,9 @@ sub run_tests {
|
|||
"GetMarcPrice returns the correct value");
|
||||
my $newincbiblioitemnumber=$biblioitemnumber+1;
|
||||
$dbh->do("UPDATE biblioitems SET biblioitemnumber = ? WHERE biblionumber = ?;", undef, $newincbiblioitemnumber, $biblionumber );
|
||||
my $updatedrecord = GetMarcBiblio($biblionumber, 0);
|
||||
my $updatedrecord = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 0 });
|
||||
my $frameworkcode = GetFrameworkCode($biblionumber);
|
||||
my ( $biblioitem_tag, $biblioitem_subfield ) = GetMarcFromKohaField( "biblioitems.biblioitemnumber", $frameworkcode );
|
||||
die qq{No biblioitemnumber tag for framework "$frameworkcode"} unless $biblioitem_tag;
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ subtest 'C4::Biblio::EmbedItemsInMarcBiblio' => sub {
|
|||
|
||||
my ($itemfield) =
|
||||
C4::Biblio::GetMarcFromKohaField( 'items.itemnumber', '' );
|
||||
my $record = C4::Biblio::GetMarcBiblio($biblionumber);
|
||||
my $record = C4::Biblio::GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
warning_is { C4::Biblio::EmbedItemsInMarcBiblio() }
|
||||
{ carped => 'EmbedItemsInMarcBiblio: No MARC record passed' },
|
||||
'Should crap is no record passed.';
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ subtest 'EmbedItemsAvailability tests' => sub {
|
|||
my $processor = Koha::RecordProcessor->new( { filters => ('EmbedItemsAvailability') } );
|
||||
is( ref($processor), 'Koha::RecordProcessor', 'Created record processor' );
|
||||
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
ok( !defined $record->field('999')->subfield('x'), q{The record doesn't originally contain 999$x} );
|
||||
# Apply filter
|
||||
$processor->process($record);
|
||||
|
|
@ -141,7 +141,7 @@ subtest 'EmbedItemsAvailability tests' => sub {
|
|||
$processor = Koha::RecordProcessor->new( { filters => ('EmbedItemsAvailability') } );
|
||||
is( ref($processor), 'Koha::RecordProcessor', 'Created record processor' );
|
||||
|
||||
$record = GetMarcBiblio($biblionumber);
|
||||
$record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
ok( !defined $record->subfield('999', 'x'), q{The record doesn't originally contain 999$x} );
|
||||
# Apply filter
|
||||
$processor->process($record);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) {
|
|||
my $timestamp = $sth->fetchrow_array . 'Z';
|
||||
$timestamp =~ s/ /T/;
|
||||
$timestamp = manipulate_timestamp( $index, $biblionumber, $timestamp );
|
||||
$record = GetMarcBiblio($biblionumber);
|
||||
$record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
$record = XMLin($record->as_xml_record);
|
||||
push @header, { datestamp => $timestamp, identifier => "TEST:$biblionumber" };
|
||||
push @oaidc, {
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ ModOAISetMappings($setVH_id, $mappingsVH);
|
|||
my $biblionumberVH = create_helper_biblio('Victor Hugo');
|
||||
|
||||
#Update
|
||||
my $record = GetMarcBiblio($biblionumberVH);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumberVH });
|
||||
UpdateOAISetsBiblio($biblionumberVH, $record);
|
||||
|
||||
#is biblio attached to setVH ?
|
||||
|
|
@ -575,7 +575,7 @@ ModOAISetMappings($setNotVH_id, $mappingsNotVH);
|
|||
my $biblionumberNotVH = create_helper_biblio('Sponge, Bob');
|
||||
|
||||
#Update
|
||||
$record = GetMarcBiblio($biblionumberNotVH);
|
||||
$record = GetMarcBiblio({ biblionumber => $biblionumberNotVH });
|
||||
UpdateOAISetsBiblio($biblionumberNotVH, $record);
|
||||
|
||||
my @setsNotEq = CalcOAISetsBiblio($record);
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ t::lib::Mocks::mock_preference( 'AgeRestrictionMarker', 'FSK|PEGI|Age|K' );
|
|||
#Reserving an not-agerestricted Biblio by a Borrower with no dateofbirth is tested previously.
|
||||
|
||||
#Set the ageRestriction for the Biblio
|
||||
my $record = GetMarcBiblio( $bibnum );
|
||||
my $record = GetMarcBiblio({ biblionumber => $bibnum });
|
||||
my ( $ageres_tagid, $ageres_subfieldid ) = GetMarcFromKohaField( "biblioitems.agerestriction" );
|
||||
$record->append_fields( MARC::Field->new($ageres_tagid, '', '', $ageres_subfieldid => 'PEGI 16') );
|
||||
C4::Biblio::ModBiblio( $record, $bibnum, $frameworkcode );
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ else {
|
|||
my $taglist = get_tag_rows( { term => $tag } );
|
||||
for ( @{$taglist} ) {
|
||||
my $dat = &GetBiblioData( $_->{biblionumber} );
|
||||
my $record = &GetMarcBiblio( $_->{biblionumber} );
|
||||
my $record = &GetMarcBiblio({ biblionumber => $_->{biblionumber} });
|
||||
$dat->{'subtitle'} =
|
||||
GetRecordValue( 'subtitle', $record,
|
||||
GetFrameworkCode( $_->{biblionumber} ) );
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ if ( $op eq 'form' ) {
|
|||
}
|
||||
my $holds_count = $biblio->holds->count;
|
||||
$biblio = $biblio->unblessed;
|
||||
my $record = &GetMarcBiblio( $record_id );
|
||||
my $record = &GetMarcBiblio({ biblionumber => $record_id });
|
||||
$biblio->{subtitle} = GetRecordValue( 'subtitle', $record, GetFrameworkCode( $record_id ) );
|
||||
$biblio->{itemnumbers} = C4::Items::GetItemnumbersForBiblio( $record_id );
|
||||
$biblio->{holds_count} = $holds_count;
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ if ( $op eq 'form' ) {
|
|||
|
||||
# Finally, modify the biblio
|
||||
my $error = eval {
|
||||
my $record = GetMarcBiblio( $biblionumber );
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
ModifyRecordWithTemplate( $mmtid, $record );
|
||||
my $frameworkcode = C4::Biblio::GetFrameworkCode( $biblionumber );
|
||||
ModBiblio( $record, $biblionumber, $frameworkcode );
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
}
|
||||
);
|
||||
|
||||
$recordBiblionumber = GetMarcBiblio($biblionumber, 'embed_items');
|
||||
$recordBiblionumber = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 'embed_items' });
|
||||
if( $recordBiblionumber ) {
|
||||
$formatted1 = $recordBiblionumber->as_formatted;
|
||||
my $biblio = Koha::Biblios->find( $biblionumber );
|
||||
|
|
|
|||
|
|
@ -71,7 +71,9 @@ if ($shelfid && $format) {
|
|||
else { #Other formats
|
||||
while ( my $content = $contents->next ) {
|
||||
my $biblionumber = $content->biblionumber;
|
||||
my $record = GetMarcBiblio($biblionumber, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
if ($format eq 'iso2709') {
|
||||
$output .= $record->as_usmarc();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,9 @@ if ($email) {
|
|||
my $biblionumber = $content->biblionumber;
|
||||
my $fw = GetFrameworkCode($biblionumber);
|
||||
my $dat = GetBiblioData($biblionumber);
|
||||
my $record = GetMarcBiblio($biblionumber, 1);
|
||||
my $record = GetMarcBiblio({
|
||||
biblionumber => $biblionumber,
|
||||
embed_items => 1 });
|
||||
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
|
||||
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
|
||||
my $subtitle = GetRecordValue( 'subtitle', $record, $fw );
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ if ( $op eq 'view' ) {
|
|||
while ( my $content = $contents->next ) {
|
||||
my $this_item;
|
||||
my $biblionumber = $content->biblionumber;
|
||||
my $record = GetMarcBiblio($biblionumber);
|
||||
my $record = GetMarcBiblio({ biblionumber => $biblionumber });
|
||||
|
||||
if ( $xslfile ) {
|
||||
$this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTListsDisplay",
|
||||
|
|
|
|||
Loading…
Reference in New Issue