From 62aa3f4292d83bc9304e296de5f0830e28510492 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 29 Aug 2016 14:07:45 +0100 Subject: [PATCH] Bug 17216: Use Koha::AVC from mss.pl Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher --- admin/marc_subfields_structure.pl | 11 +++-------- .../prog/en/modules/admin/marc_subfields_structure.tt | 1 + 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index 38e6f24387..24c8005800 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -24,6 +24,7 @@ use CGI qw ( -utf8 ); use C4::Context; use Koha::Authority::Types; +use Koha::AuthorisedValueCategories; use List::MoreUtils qw( uniq ); @@ -128,14 +129,8 @@ if ( $op eq 'add_form' ) { $sth2->finish; $sth2 = $dbh->prepare("select distinct category from authorised_values"); $sth2->execute; - my @authorised_values; - push @authorised_values, ""; - while ( ( my $category ) = $sth2->fetchrow_array ) { - push @authorised_values, $category; - } - push( @authorised_values, "branches" ); - push( @authorised_values, "itemtypes" ); - push( @authorised_values, "cn_source" ); + my @av_cat = Koha::AuthorisedValueCategories->search; + my @authorised_values = map { $_->category_name } @av_cat; # build thesaurus categories list my @authtypes = uniq( "", map { $_->authtypecode } Koha::Authority::Types->search ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt index 481df61c21..4e70bfcd70 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt @@ -163,6 +163,7 @@