View | Details | Raw Unified | Return to bug 4321
Collapse All | Expand All

(-)a/C4/Biblio.pm (-7 / +5 lines)
Lines 998-1004 sub GetISBDView { Link Here
998
998
999
=head2 GetBiblio
999
=head2 GetBiblio
1000
1000
1001
  ( $count, @results ) = &GetBiblio($biblionumber);
1001
  my $biblio = &GetBiblio($biblionumber);
1002
1002
1003
=cut
1003
=cut
1004
1004
Lines 1009-1020 sub GetBiblio { Link Here
1009
    my $count          = 0;
1009
    my $count          = 0;
1010
    my @results;
1010
    my @results;
1011
    $sth->execute($biblionumber);
1011
    $sth->execute($biblionumber);
1012
    while ( my $data = $sth->fetchrow_hashref ) {
1012
    if ( my $data = $sth->fetchrow_hashref ) {
1013
        $results[$count] = $data;
1013
        return $data;
1014
        $count++;
1014
    }
1015
    }    # while
1015
    return;
1016
    $sth->finish;
1017
    return ( $count, @results );
1018
}    # sub GetBiblio
1016
}    # sub GetBiblio
1019
1017
1020
=head2 GetBiblioItemInfosOf
1018
=head2 GetBiblioItemInfosOf
(-)a/C4/ILSDI/Services.pm (-3 / +3 lines)
Lines 411-417 sub GetPatronInfo { Link Here
411
            # Add additional fields
411
            # Add additional fields
412
            $reserve->{'item'}       = $item;
412
            $reserve->{'item'}       = $item;
413
            $reserve->{'branchname'} = $branchname;
413
            $reserve->{'branchname'} = $branchname;
414
            $reserve->{'title'}      = ( GetBiblio( $reserve->{'biblionumber'} ) )[1]->{'title'};
414
            $reserve->{'title'}      = GetBiblio( $reserve->{'biblionumber'} )->{'title'};
415
        }
415
        }
416
        $borrower->{'holds'}->{'hold'} = \@reserves;
416
        $borrower->{'holds'}->{'hold'} = \@reserves;
417
    }
417
    }
Lines 597-603 sub HoldTitle { Link Here
597
597
598
    # Get the biblio record, or return an error code
598
    # Get the biblio record, or return an error code
599
    my $biblionumber = $cgi->param('bib_id');
599
    my $biblionumber = $cgi->param('bib_id');
600
    my ( $count, $biblio ) = GetBiblio( $biblionumber );
600
    my $biblio = GetBiblio( $biblionumber );
601
    return { code => 'RecordNotFound' } unless $$biblio{biblionumber};
601
    return { code => 'RecordNotFound' } unless $$biblio{biblionumber};
602
    
602
    
603
    my $title = $$biblio{title};
603
    my $title = $$biblio{title};
Lines 662-668 sub HoldItem { Link Here
662
662
663
    # Get the biblio or return an error code
663
    # Get the biblio or return an error code
664
    my $biblionumber = $cgi->param('bib_id');
664
    my $biblionumber = $cgi->param('bib_id');
665
    my ( $count, $biblio ) = GetBiblio($biblionumber);
665
    my $biblio = GetBiblio($biblionumber);
666
    return { code => 'RecordNotFound' } unless $$biblio{biblionumber};
666
    return { code => 'RecordNotFound' } unless $$biblio{biblionumber};
667
667
668
    my $title = $$biblio{title};
668
    my $title = $$biblio{title};
(-)a/C4/ImportBatch.pm (-2 / +2 lines)
Lines 539-545 sub BatchCommitBibRecords { Link Here
539
        } elsif ($bib_result eq 'replace') {
539
        } elsif ($bib_result eq 'replace') {
540
            $num_updated++;
540
            $num_updated++;
541
            my $biblionumber = $bib_match;
541
            my $biblionumber = $bib_match;
542
            my ($count, $oldbiblio) = GetBiblio($biblionumber);
542
            my $oldbiblio = GetBiblio($biblionumber);
543
            my $oldxml = GetXmlBiblio($biblionumber);
543
            my $oldxml = GetXmlBiblio($biblionumber);
544
544
545
            # remove item fields so that they don't get
545
            # remove item fields so that they don't get
Lines 679-685 sub BatchRevertBibRecords { Link Here
679
            $num_reverted++;
679
            $num_reverted++;
680
            my $old_record = MARC::Record->new_from_xml(StripNonXmlChars($rowref->{'marcxml_old'}), 'UTF-8', $rowref->{'encoding'});
680
            my $old_record = MARC::Record->new_from_xml(StripNonXmlChars($rowref->{'marcxml_old'}), 'UTF-8', $rowref->{'encoding'});
681
            my $biblionumber = $rowref->{'matched_biblionumber'};
681
            my $biblionumber = $rowref->{'matched_biblionumber'};
682
            my ($count, $oldbiblio) = GetBiblio($biblionumber);
682
            my $oldbiblio = GetBiblio($biblionumber);
683
            $num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'});
683
            $num_items_deleted += BatchRevertItems($rowref->{'import_record_id'}, $rowref->{'matched_biblionumber'});
684
            ModBiblio($old_record, $biblionumber, $oldbiblio->{'frameworkcode'});
684
            ModBiblio($old_record, $biblionumber, $oldbiblio->{'frameworkcode'});
685
            SetImportRecordStatus($rowref->{'import_record_id'}, 'reverted');
685
            SetImportRecordStatus($rowref->{'import_record_id'}, 'reverted');
(-)a/C4/Serials.pm (-1 / +1 lines)
Lines 1302-1308 sub NewSubscription { Link Here
1302
    logaction( "SERIAL", "ADD", $subscriptionid, "" ) if C4::Context->preference("SubscriptionLog");
1302
    logaction( "SERIAL", "ADD", $subscriptionid, "" ) if C4::Context->preference("SubscriptionLog");
1303
1303
1304
    #set serial flag on biblio if not already set.
1304
    #set serial flag on biblio if not already set.
1305
    my ( $null, ($bib) ) = GetBiblio($biblionumber);
1305
    my $bib = GetBiblio($biblionumber);
1306
    if ( !$bib->{'serial'} ) {
1306
    if ( !$bib->{'serial'} ) {
1307
        my $record = GetMarcBiblio($biblionumber);
1307
        my $record = GetMarcBiblio($biblionumber);
1308
        my ( $tag, $subf ) = GetMarcFromKohaField( 'biblio.serial', $bib->{'frameworkcode'} );
1308
        my ( $tag, $subf ) = GetMarcFromKohaField( 'biblio.serial', $bib->{'frameworkcode'} );
(-)a/catalogue/imageviewer.pl (-1 / +1 lines)
Lines 41-47 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
41
41
42
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
42
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
43
my $imagenumber = $query->param('imagenumber');
43
my $imagenumber = $query->param('imagenumber');
44
my ( $count, $biblio ) = GetBiblio($biblionumber);
44
my $biblio = GetBiblio($biblionumber);
45
my $itemcount = GetItemsCount($biblionumber);
45
my $itemcount = GetItemsCount($biblionumber);
46
46
47
my @items = GetItemsInfo($biblionumber);
47
my @items = GetItemsInfo($biblionumber);
(-)a/catalogue/issuehistory.pl (-2 / +2 lines)
Lines 61-70 if ($itemnumber){ Link Here
61
	);
61
	);
62
} else {
62
} else {
63
	$issues = GetBiblioIssues($biblionumber);
63
	$issues = GetBiblioIssues($biblionumber);
64
	my (undef,@biblio)=GetBiblio($biblionumber);
64
	my $biblio = GetBiblio($biblionumber);
65
	my $total  = scalar @$issues;
65
	my $total  = scalar @$issues;
66
	$template->param(
66
	$template->param(
67
		%{$biblio[0]},
67
		%{$biblio},
68
	);
68
	);
69
} 
69
} 
70
foreach (@{$issues}){
70
foreach (@{$issues}){
(-)a/opac/opac-imageviewer.pl (-2 / +1 lines)
Lines 39-45 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
39
39
40
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
40
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
41
my $imagenumber = $query->param('imagenumber');
41
my $imagenumber = $query->param('imagenumber');
42
my ( $count, $biblio ) = GetBiblio($biblionumber);
42
my $biblio = GetBiblio($biblionumber);
43
43
44
if ( C4::Context->preference("OPACLocalCoverImages") ) {
44
if ( C4::Context->preference("OPACLocalCoverImages") ) {
45
    my @images = ListImagesForBiblio($biblionumber);
45
    my @images = ListImagesForBiblio($biblionumber);
46
- 

Return to bug 4321