Bugzilla – Attachment 167535 Details for
Bug 14670
Add 'cite' option to detail page in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14670: Fix tests and import
Bug-14670-Fix-tests-and-import.patch (text/plain), 3.52 KB, created by
ByWater Sandboxes
on 2024-06-06 10:06:07 UTC
(
hide
)
Description:
Bug 14670: Fix tests and import
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2024-06-06 10:06:07 UTC
Size:
3.52 KB
patch
obsolete
>From d0c631d9dfe47c4a5403f27ae78e4d61383afb26 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 29 Jan 2024 17:12:15 +0100 >Subject: [PATCH] Bug 14670: Fix tests and import > >Sponsored-by: Orex Digital >Signed-off-by: alexandre <alexandre.noel@inlibro.com> >Signed-off-by: hugo <hagud@orex.es> >--- > opac/opac-ISBDdetail.pl | 4 ++-- > opac/opac-MARCdetail.pl | 4 ++-- > opac/opac-detail.pl | 4 ++-- > t/db_dependent/Record.t | 12 +++--------- > 4 files changed, 9 insertions(+), 15 deletions(-) > >diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl >index 1217b76f40..b4f13fafef 100755 >--- a/opac/opac-ISBDdetail.pl >+++ b/opac/opac-ISBDdetail.pl >@@ -52,7 +52,7 @@ use C4::Biblio qw( > GetMarcISSN > TransformMarcToKoha > ); >-use C4::Record; >+use C4::Record qw( marc2cites );; > use C4::Reserves qw( IsAvailableForItemLevelRequest ); > use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials ); > use C4::Koha qw( >@@ -230,6 +230,6 @@ if( C4::Context->preference('ArticleRequests') ) { > } > > # Cites >-$template->{VARS}->{'cites'} = marc2cites($record); >+$template->param( cites => C4::Record::marc2cites($record) ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl >index 4f9d5dfb83..912b617f6c 100755 >--- a/opac/opac-MARCdetail.pl >+++ b/opac/opac-MARCdetail.pl >@@ -58,7 +58,7 @@ use C4::Biblio qw( > GetMarcStructure > TransformMarcToKoha > ); >-use C4::Record; >+use C4::Record qw( marc2cites ); > use C4::Reserves qw( IsAvailableForItemLevelRequest ); > use C4::Members; > use C4::Koha qw( GetNormalizedISBN ); >@@ -387,6 +387,6 @@ $template->param( > ); > > # Cites >-$template->{VARS}->{'cites'} = marc2cites($record); >+$template->param( cites => C4::Record::marc2cites($record) ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index de28aca551..aa8b892190 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -45,7 +45,7 @@ use C4::Biblio qw( > GetMarcSubjects > GetMarcUrls > ); >-use C4::Record; >+use C4::Record qw( marc2cites ); > use C4::Tags qw( get_tags ); > use C4::XISBN qw( get_xisbns ); > use C4::External::Amazon qw( get_amazon_tld ); >@@ -1253,6 +1253,6 @@ if ( C4::Context->preference('OPACAuthorIdentifiersAndInformation') ) { > } > > # Cites >-$template->{VARS}->{'cites'} = marc2cites($record); >+$template->param( cites => C4::Record::marc2cites($record) ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/t/db_dependent/Record.t b/t/db_dependent/Record.t >index 2688fd542a..9c9b237c8e 100755 >--- a/t/db_dependent/Record.t >+++ b/t/db_dependent/Record.t >@@ -10,7 +10,7 @@ use C4::Context; > use Koha::Database; > > BEGIN { >- use_ok('C4::Record', qw( marc2marc marc2marcxml marcxml2marc marc2dcxml marc2modsxml marc2bibtex )); >+ use_ok('C4::Record', qw( marc2marc marc2marcxml marcxml2marc marc2dcxml marc2modsxml marc2bibtex marc2cites )); > } > > my $schema = Koha::Database->new->schema; >@@ -155,12 +155,6 @@ my @entity=C4::Record::_entity_encode("Björn"); > is ($entity[0], "Björn", "Html umlauts"); > > >- >- >-$marc->field('260')->add_subfields(a => 'Hogwarts'); >+$marc->field('260')->add_subfields( a => 'Hogwarts' ); > my $cites = marc2cites($marc); >-is ($cites->{'Chicago'}, 'Rowling J.K, . 2011. Harry potter. Hogwarts: Reprints.', 'testing marc2cites'); >- >- >- >- >+is( $cites->{'Chicago'}, 'Rowling J.K, . 2011. Harry potter. Hogwarts: Reprints.', 'testing marc2cites' ); >-- >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 14670
:
41441
|
42971
|
43508
|
43770
|
43771
|
43828
|
43829
|
43919
|
43920
|
43921
|
43922
|
43923
|
43924
|
75679
|
75680
|
75681
|
75682
|
75683
|
161600
|
161601
|
161602
|
161603
|
161604
|
161605
|
161606
|
161607
|
166474
|
167528
|
167529
|
167530
|
167531
|
167532
|
167533
|
167534
|
167535
|
173515
|
173516
|
173517
|
173518
|
173519
|
173520
|
173521
|
173522
|
173523
|
173524
|
174453