86 my $record = GetMarcBiblio({ biblionumber => $biblionumber }); 87 my $biblio = Koha::Biblios->find( $biblionumber ); 88 $template->param( 'biblio', $biblio ); 89 90 if ( not defined $record ) { 91 # biblionumber invalid -> report and exit 92 $template->param( unknownbiblionumber => 1, 93 biblionumber => $biblionumber ); 94 output_html_with_http_headers $query, $cookie, $template->output; 95 exit; 96 } 97 98 eval { $biblio->metadata->record }; 99 $template->param( decoding_error => $@ );
Created attachment 126749 [details] [review] Bug 29307: Remove unecessary marc record fetch on detail.pl We were fetching the MARC::Record twice here.
Created attachment 126791 [details] [review] Bug 29307: Remove unecessary marc record fetch on detail.pl We were fetching the MARC::Record twice here. Signed-off-by: David Nind <david@davidnind.com>
Tested by checking that the MARC detail pages in the staff interface work as expected after the patch is applied.
They don't do quite the same thing, GetMarcBiblio calls C4::Biblio::_koha_marc_update_bib_ids() and $biblio->metadata->record doesn't.
(In reply to Joonas Kylmälä from comment #4) > They don't do quite the same thing, GetMarcBiblio calls > C4::Biblio::_koha_marc_update_bib_ids() and $biblio->metadata->record > doesn't. What differences do you expect? The point of those tests is to not explode later basically, so we must know if the record has a valid MARCXML stored in the biblio_metadata table.
(In reply to Jonathan Druart from comment #5) > (In reply to Joonas Kylmälä from comment #4) > > They don't do quite the same thing, GetMarcBiblio calls > > C4::Biblio::_koha_marc_update_bib_ids() and $biblio->metadata->record > > doesn't. > > What differences do you expect? Commenting on this just based on the code I read: Before this patch the detail page included biblionumbers if they were not in the original data, after this patch it doesn't.
(In reply to Joonas Kylmälä from comment #6) > (In reply to Jonathan Druart from comment #5) > > (In reply to Joonas Kylmälä from comment #4) > > > They don't do quite the same thing, GetMarcBiblio calls > > > C4::Biblio::_koha_marc_update_bib_ids() and $biblio->metadata->record > > > doesn't. > > > > What differences do you expect? > > Commenting on this just based on the code I read: Before this patch the > detail page included biblionumbers if they were not in the original data, > after this patch it doesn't. Yes, I don't think this call in GetMarcBiblio is relevant, I opened bug 29486.
Created attachment 131864 [details] [review] Bug 29307: Remove unecessary marc record fetch on detail.pl We were fetching the MARC::Record twice here. Signed-off-by: David Nind <david@davidnind.com>
Will be fixed by bug 29697. *** This bug has been marked as a duplicate of bug 29697 ***