Lines 2822-2831
sub PrepareItemrecordDisplay {
Link Here
|
2822 |
$frameworkcode = &GetFrameworkCode($bibnum) if $bibnum; |
2822 |
$frameworkcode = &GetFrameworkCode($bibnum) if $bibnum; |
2823 |
my ( $itemtagfield, $itemtagsubfield ) = &GetMarcFromKohaField( "items.itemnumber", $frameworkcode ); |
2823 |
my ( $itemtagfield, $itemtagsubfield ) = &GetMarcFromKohaField( "items.itemnumber", $frameworkcode ); |
2824 |
|
2824 |
|
2825 |
# it would be perhaps beneficial (?) to call GetMarcStructure with 'unsafe' parameter |
2825 |
# WARNING: note that $tagslib obtained from GetMarcStructure() |
2826 |
# for performance reasons, but $tagslib may be passed to $plugin->build(), and there |
2826 |
# in 'unsafe' mode is a shared data structure. As it may be passed |
2827 |
# is no way to ensure that this structure is not getting corrupted somewhere in there |
2827 |
# to $plugin->build(), custom item plugins SHOULD NOT modify it's |
2828 |
my $tagslib = &GetMarcStructure( 1, $frameworkcode ); |
2828 |
# contents in any way, under any circumstances. |
|
|
2829 |
my $tagslib = &GetMarcStructure( 1, $frameworkcode, { unsafe => 1 } ); |
2829 |
|
2830 |
|
2830 |
# return nothing if we don't have found an existing framework. |
2831 |
# return nothing if we don't have found an existing framework. |
2831 |
return q{} unless $tagslib; |
2832 |
return q{} unless $tagslib; |
Lines 2849-2861
sub PrepareItemrecordDisplay {
Link Here
|
2849 |
$query .= qq{ ORDER BY lib}; |
2850 |
$query .= qq{ ORDER BY lib}; |
2850 |
my $authorised_values_sth = $dbh->prepare( $query ); |
2851 |
my $authorised_values_sth = $dbh->prepare( $query ); |
2851 |
foreach my $tag ( sort keys %{$tagslib} ) { |
2852 |
foreach my $tag ( sort keys %{$tagslib} ) { |
2852 |
my $previous_tag = ''; |
|
|
2853 |
if ( $tag ne '' ) { |
2853 |
if ( $tag ne '' ) { |
2854 |
|
2854 |
|
2855 |
# loop through each subfield |
2855 |
# loop through each subfield |
2856 |
my $cntsubf; |
2856 |
my $cntsubf; |
2857 |
foreach my $subfield ( sort keys %{ $tagslib->{$tag} } ) { |
2857 |
foreach my $subfield ( sort keys %{ $tagslib->{$tag} } ) { |
2858 |
next if IsMarcStructureInternal($tagslib->{$tag}{$subfield}); |
2858 |
next if IsMarcStructureInternal($tagslib->{$tag}{$subfield}); |
|
|
2859 |
next unless ( $tagslib->{$tag}->{$subfield}->{'tab'} ); |
2859 |
next if ( $tagslib->{$tag}->{$subfield}->{'tab'} ne "10" ); |
2860 |
next if ( $tagslib->{$tag}->{$subfield}->{'tab'} ne "10" ); |
2860 |
my %subfield_data; |
2861 |
my %subfield_data; |
2861 |
$subfield_data{tag} = $tag; |
2862 |
$subfield_data{tag} = $tag; |
2862 |
- |
|
|