Lines 301-313
my $pref_itemcallnumber = C4::Context->preference('itemcallnumber');
Link Here
|
301 |
|
301 |
|
302 |
# Getting list of subfields to keep when restricted batchmod edit is enabled |
302 |
# Getting list of subfields to keep when restricted batchmod edit is enabled |
303 |
my $subfieldsToAllowForBatchmod = C4::Context->preference('SubfieldsToAllowForRestrictedBatchmod'); |
303 |
my $subfieldsToAllowForBatchmod = C4::Context->preference('SubfieldsToAllowForRestrictedBatchmod'); |
|
|
304 |
my $allowAllSubfields = ( |
305 |
not defined $subfieldsToAllowForBatchmod |
306 |
or $subfieldsToAllowForBatchmod == q|| |
307 |
) ? 1 : 0; |
304 |
my @subfieldsToAllow = split(/ /, $subfieldsToAllowForBatchmod); |
308 |
my @subfieldsToAllow = split(/ /, $subfieldsToAllowForBatchmod); |
305 |
|
309 |
|
306 |
foreach my $tag (sort keys %{$tagslib}) { |
310 |
foreach my $tag (sort keys %{$tagslib}) { |
307 |
# loop through each subfield |
311 |
# loop through each subfield |
308 |
foreach my $subfield (sort keys %{$tagslib->{$tag}}) { |
312 |
foreach my $subfield (sort keys %{$tagslib->{$tag}}) { |
309 |
next if subfield_is_koha_internal_p($subfield); |
313 |
next if subfield_is_koha_internal_p($subfield); |
310 |
next if ($restrictededition && !grep { $tag . '$' . $subfield eq $_ } @subfieldsToAllow ); |
314 |
next if (not $allowAllSubfields and $restrictededition && !grep { $tag . '$' . $subfield eq $_ } @subfieldsToAllow ); |
311 |
next if ($tagslib->{$tag}->{$subfield}->{'tab'} ne "10"); |
315 |
next if ($tagslib->{$tag}->{$subfield}->{'tab'} ne "10"); |
312 |
# barcode and stocknumber are not meant to be batch-modified |
316 |
# barcode and stocknumber are not meant to be batch-modified |
313 |
next if $tagslib->{$tag}->{$subfield}->{'kohafield'} eq 'items.barcode'; |
317 |
next if $tagslib->{$tag}->{$subfield}->{'kohafield'} eq 'items.barcode'; |
314 |
- |
|
|