From 01dff287da65c1b80470a0cbf623e4a62fa96c04 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Tue, 15 Dec 2015 10:15:25 -0500 Subject: [PATCH] Bug 15382: 245$a visibility constraints not respected in opac-MARCdetail.pl This tiny change determines if the bibliotitle should be set or not in accordance with the 'Advanced constraints' visiblity setting for OPAC. TEST PLAN --------- 1) Find a record detail in OPAC 2) Click 'MARC view' -- 245$a should be visible. 3) In a new tab, log into the staff client 4) Click 'Koha administration' 5) Click 'MARC bibliographic framework' 6) Click 'MARC structure' for the framework of the record displayed in OPAC. 7) Search for tag: 245, and click 'Search' 8) Click 'Subfields' 9) Click 'Edit' beside the a subfield. 10) Click 'Advanced constraints' 11) Uncheck 'OPAC' 12) Click 'Save changes' 13) In the OPAC tab, refresh -- 245$a (Title) will still be visible! 14) Apply this patch 15) In the OPAC tab, refresh -- 245$a (Title) will be hidden. 16) In the staff client, navigate back to 'Advanced constraints' and check 'OPAC' 17) Click 'Save changes' 18) In the OPAC tab, refresh -- 245$a (Title) will be visible again. 19) Run koha qa tools Signed-off-by: Aleisha --- opac/opac-MARCdetail.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl index afac5d7..79b92a8 100755 --- a/opac/opac-MARCdetail.pl +++ b/opac/opac-MARCdetail.pl @@ -100,9 +100,10 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +my ($bt_tag,$bt_subtag) = GetMarcFromKohaField('biblio.title',$itemtype); $template->param( bibliotitle => $biblio->{title}, -); +) if $tagslib->{$bt_tag}->{$bt_subtag}->{hidden} <= 0; #<=0 is OPAC visible. # get biblionumbers stored in the cart if(my $cart_list = $query->cookie("bib_list")){ -- 1.7.10.4