|
Lines 156-161
while ( my ($category) = $sth->fetchrow_array ) {
Link Here
|
| 156 |
push( @category_list, 'MONTHS' ); |
156 |
push( @category_list, 'MONTHS' ); |
| 157 |
push( @category_list, 'ITEMTYPES' ); |
157 |
push( @category_list, 'ITEMTYPES' ); |
| 158 |
push( @category_list, 'BRANCHES' ); |
158 |
push( @category_list, 'BRANCHES' ); |
|
|
159 |
push( @category_list, $$_{'authcat'} ) foreach @$auth_cats_loop; |
| 159 |
|
160 |
|
| 160 |
#reorder the list |
161 |
#reorder the list |
| 161 |
@category_list = sort { $a cmp $b } @category_list; |
162 |
@category_list = sort { $a cmp $b } @category_list; |
|
Lines 177-183
my @authvals;
Link Here
|
| 177 |
my %labels; |
178 |
my %labels; |
| 178 |
|
179 |
|
| 179 |
my @names = $input->param(); |
180 |
my @names = $input->param(); |
| 180 |
|
|
|
| 181 |
# ------------------------------------------------------------ |
181 |
# ------------------------------------------------------------ |
| 182 |
if ( $op eq 'save' ) { |
182 |
if ( $op eq 'save' ) { |
| 183 |
|
183 |
|
|
Lines 294-299
elsif ( $authcat eq 'ITEMTYPES' ) {
Link Here
|
| 294 |
} |
294 |
} |
| 295 |
} |
295 |
} |
| 296 |
$sth->finish; |
296 |
$sth->finish; |
|
|
297 |
} elsif ($authcat) { |
| 298 |
my $query = qq{ SELECT * FROM authorised_values WHERE category=? order by lib }; |
| 299 |
my $sth = $dbh->prepare($query); |
| 300 |
$sth->execute($authcat); |
| 301 |
if ( $sth->rows > 0 ) { |
| 302 |
for ( my $i = 0 ; $i < $sth->rows ; $i++ ) { |
| 303 |
my $results = $sth->fetchrow_hashref; |
| 304 |
push @authvals, $results->{authorised_value}; |
| 305 |
$labels{ $results->{authorised_value} } = $results->{lib}; |
| 306 |
} |
| 307 |
} |
| 308 |
$sth->finish; |
| 297 |
} |
309 |
} |
| 298 |
|
310 |
|
| 299 |
my @authvals_row; |
311 |
my @authvals_row; |