$value = $input->param('barcode');
}
- # Getting list of subfields to keep when restricted editing is enabled
- my $subfieldsToAllowForRestrictedEditing = C4::Context->preference('SubfieldsToAllowForRestrictedEditing');
- my $allowAllSubfields = (
- not defined $subfieldsToAllowForRestrictedEditing
- or $subfieldsToAllowForRestrictedEditing == q||
- ) ? 1 : 0;
- my @subfieldsToAllow = split(/ /, $subfieldsToAllowForRestrictedEditing);
-
if ( $subfieldlib->{authorised_value} ) {
my @authorised_values;
my %authorised_lib;
labels => \%authorised_lib,
default => $value,
};
- # If we're on restricted editing, and our field is not in the list of subfields to allow,
- # then it is read-only
- $subfield_data{marc_value}->{readonlyselect} = (
- not $allowAllSubfields
- and $restrictededition
- and !grep { $tag . '$' . $subfieldtag eq $_ } @subfieldsToAllow
- ) ? 1: 0;
}
}
# it's a thesaurus / authority field
value => $value,
};
}
-
+
+ # Getting list of subfields to keep when restricted editing is enabled
+ my $subfieldsToAllowForRestrictedEditing = C4::Context->preference('SubfieldsToAllowForRestrictedEditing');
+ my $allowAllSubfields = (
+ not defined $subfieldsToAllowForRestrictedEditing
+ or $subfieldsToAllowForRestrictedEditing == q||
+ ) ? 1 : 0;
+ my @subfieldsToAllow = split(/ /, $subfieldsToAllowForRestrictedEditing);
+
+ # If we're on restricted editing, and our field is not in the list of subfields to allow,
+ # then it is read-only
+ $subfield_data{marc_value}->{readonly} = (
+ not $allowAllSubfields
+ and $restrictededition
+ and !grep { $tag . '$' . $subfieldtag eq $_ } @subfieldsToAllow
+ ) ? 1: 0;
+
return \%subfield_data;
}
$restrictededition = 0 if ($restrictededition != 0 && $frameworkcode eq 'FA' && haspermission($uid, {'editcatalogue' => 'fast_cataloging'}));
my $tagslib = &GetMarcStructure(1,$frameworkcode);
-my $record = GetMarcBiblio($biblionumber);
+my $record = GetMarcBiblio({ biblionumber => $biblionumber });
my $oldrecord = TransformMarcToKoha($record);
my $itemrecord;
my $nextop="additem";
my $newitemlost = $itemtosave->subfield( $lost_tag, $lost_subfield );
if (($olditemlost eq '0' or $olditemlost eq '' ) and $newitemlost ge '1'){
- LostItem($itemnumber,'MARK RETURNED');
+ LostItem($itemnumber);
}
$nextop="additem";
} elsif ($op eq "delinkitem"){
#-------------------------------------------------------------------------------
# now, build existiing item list
-my $temp = GetMarcBiblio( $biblionumber );
+my $temp = GetMarcBiblio({ biblionumber => $biblionumber });
#my @fields = $record->fields();
foreach my $hostfield ($temp->field($analyticfield)){
my $hostbiblionumber = $hostfield->subfield('0');
if ($hostbiblionumber){
- my $hostrecord = GetMarcBiblio($hostbiblionumber, 1);
+ my $hostrecord = GetMarcBiblio({
+ biblionumber => $hostbiblionumber,
+ embed_items => 1 });
if ($hostrecord) {
my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostbiblionumber) );
foreach my $hostitem ($hostrecord->field($itemfield)){