Bugzilla – Attachment 148136 Details for
Bug 32734
Add GET endpoint for listing Biblios
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32734: (QA follow-up) Remove stray method
Bug-32734-QA-follow-up-Remove-stray-method.patch (text/plain), 2.49 KB, created by
Tomás Cohen Arazi
on 2023-03-13 18:10:01 UTC
(
hide
)
Description:
Bug 32734: (QA follow-up) Remove stray method
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2023-03-13 18:10:01 UTC
Size:
2.49 KB
patch
obsolete
>From 20f6e9453004a5a4cc194b7ebc0006b351b03072 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 13 Mar 2023 14:58:21 -0300 >Subject: [PATCH] Bug 32734: (QA follow-up) Remove stray method > >On bug 33083 we introduce a better way to implement a reusable method >for the same functionality. > >This patch just removes the one in `Koha::Biblios` and the result should >be the same as the one inherited from `Koha::Objects::Record::Collections` will be picked instead. > >To test: >1. Run: > $ prove t/db_dependent/Koha/Biblios.t \ > t/db_dependent/api/v1/biblios.t >=> SUCCESS: Tests pass! >2. Apply this patch >3. Repeat 1 >=> SUCCESS: Tests pass! > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Biblios.pm | 43 ------------------------------------------- > 1 file changed, 43 deletions(-) > >diff --git a/Koha/Biblios.pm b/Koha/Biblios.pm >index b41cda65266..cf1cbdb83ad 100644 >--- a/Koha/Biblios.pm >+++ b/Koha/Biblios.pm >@@ -24,10 +24,6 @@ use Koha::Database; > > use Koha::Biblio; > use Koha::Libraries; >-use MARC::File::MiJ; >-use MARC::File::USMARC; >-use MARC::File::XML; >-use MARC::Record; > > use base qw(Koha::Objects Koha::Objects::Record::Collections); > >@@ -39,45 +35,6 @@ Koha::Biblios - Koha Biblio object set class > > =head2 Class methods > >-=head3 print_collection >- my $collection_text = $result_set->print_collection($format) >- >-Return a text representation of a collection (group of records) in the specified format. >-Allowed formats are marcxml, mij, marc and txt. Defaults to marcxml. >- >-=cut >- >-sub print_collection { >- my ( $self, $format ) = @_; >- >- my ($start, $glue, $end, @parts); >- >- my %serializers = ( >- 'mij' => \&MARC::File::MiJ::encode, >- 'marc' => \&MARC::File::USMARC::encode, >- 'txt' => \&MARC::Record::as_formatted, >- 'marcxml' => \&MARC::File::XML::record >- ); >- if ($format eq 'mij') { >- $start = '['; >- $glue = ','; >- $end = ']'; >- } elsif ($format eq 'marc') { >- $glue = "\n"; >- } elsif ($format eq 'txt') { >- $glue = "\n\n"; >- } else { >- $glue = ''; >- $format = 'marcxml'; >- $start = MARC::File::XML::header(); >- $end = MARC::File::XML::footer(); >- } >- while (my $biblio = $self->next) { >- push @parts, $serializers{$format}->($biblio->metadata->record); >- } >- return (defined $start ? $start : '').join($glue, @parts).(defined $end ? $end : ''); >-} >- > =head3 pickup_locations > > my $biblios = Koha::Biblios->search(...); >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32734
:
146751
|
146804
|
146855
|
147476
|
148086
|
148124
| 148136 |
148137