Lines 24-29
use CGI qw ( -utf8 );
Link Here
|
24 |
use C4::Context; |
24 |
use C4::Context; |
25 |
|
25 |
|
26 |
use Koha::Authority::Types; |
26 |
use Koha::Authority::Types; |
|
|
27 |
use Koha::AuthorisedValueCategories; |
27 |
|
28 |
|
28 |
use List::MoreUtils qw( uniq ); |
29 |
use List::MoreUtils qw( uniq ); |
29 |
|
30 |
|
Lines 128-141
if ( $op eq 'add_form' ) {
Link Here
|
128 |
$sth2->finish; |
129 |
$sth2->finish; |
129 |
$sth2 = $dbh->prepare("select distinct category from authorised_values"); |
130 |
$sth2 = $dbh->prepare("select distinct category from authorised_values"); |
130 |
$sth2->execute; |
131 |
$sth2->execute; |
131 |
my @authorised_values; |
132 |
my @av_cat = Koha::AuthorisedValueCategories->search; |
132 |
push @authorised_values, ""; |
133 |
my @authorised_values = map { $_->category_name } @av_cat; |
133 |
while ( ( my $category ) = $sth2->fetchrow_array ) { |
|
|
134 |
push @authorised_values, $category; |
135 |
} |
136 |
push( @authorised_values, "branches" ); |
137 |
push( @authorised_values, "itemtypes" ); |
138 |
push( @authorised_values, "cn_source" ); |
139 |
|
134 |
|
140 |
# build thesaurus categories list |
135 |
# build thesaurus categories list |
141 |
my @authtypes = uniq( "", map { $_->authtypecode } Koha::Authority::Types->search ); |
136 |
my @authtypes = uniq( "", map { $_->authtypecode } Koha::Authority::Types->search ); |