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

(-)a/C4/Biblio.pm (-7 / +5 lines)
Lines 999-1005 sub GetISBDView { Link Here
999
999
1000
=head2 GetBiblio
1000
=head2 GetBiblio
1001
1001
1002
  ( $count, @results ) = &GetBiblio($biblionumber);
1002
  my $biblio = &GetBiblio($biblionumber);
1003
1003
1004
=cut
1004
=cut
1005
1005
Lines 1010-1021 sub GetBiblio { Link Here
1010
    my $count          = 0;
1010
    my $count          = 0;
1011
    my @results;
1011
    my @results;
1012
    $sth->execute($biblionumber);
1012
    $sth->execute($biblionumber);
1013
    while ( my $data = $sth->fetchrow_hashref ) {
1013
    if ( my $data = $sth->fetchrow_hashref ) {
1014
        $results[$count] = $data;
1014
        return $data;
1015
        $count++;
1015
    }
1016
    }    # while
1016
    return;
1017
    $sth->finish;
1018
    return ( $count, @results );
1019
}    # sub GetBiblio
1017
}    # sub GetBiblio
1020
1018
1021
=head2 GetBiblioItemInfosOf
1019
=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 1303-1309 sub NewSubscription { Link Here
1303
    logaction( "SERIAL", "ADD", $subscriptionid, "" ) if C4::Context->preference("SubscriptionLog");
1303
    logaction( "SERIAL", "ADD", $subscriptionid, "" ) if C4::Context->preference("SubscriptionLog");
1304
1304
1305
    #set serial flag on biblio if not already set.
1305
    #set serial flag on biblio if not already set.
1306
    my ( $null, ($bib) ) = GetBiblio($biblionumber);
1306
    my $bib = GetBiblio($biblionumber);
1307
    if ( !$bib->{'serial'} ) {
1307
    if ( !$bib->{'serial'} ) {
1308
        my $record = GetMarcBiblio($biblionumber);
1308
        my $record = GetMarcBiblio($biblionumber);
1309
        my ( $tag, $subf ) = GetMarcFromKohaField( 'biblio.serial', $bib->{'frameworkcode'} );
1309
        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