Bug 29058: Add 'Always show holds' checkbox to request.pl
[koha-ffzg.git] / C4 / Items.pm
index 7f83736..ce28557 100644 (file)
@@ -894,8 +894,7 @@ sub GetHostItemsInfo {
     }
 
     my @fields;
-    if( C4::Context->preference('marcflavour') eq 'MARC21' ||
-      C4::Context->preference('marcflavour') eq 'NORMARC') {
+    if( C4::Context->preference('marcflavour') eq 'MARC21' ) {
         @fields = $record->field('773');
     } elsif( C4::Context->preference('marcflavour') eq 'UNIMARC') {
         @fields = $record->field('461');
@@ -940,7 +939,7 @@ sub get_hostitemnumbers_of {
     my ( @returnhostitemnumbers, $tag, $biblio_s, $item_s );
 
     my $marcflavor = C4::Context->preference('marcflavour');
-    if ( $marcflavor eq 'MARC21' || $marcflavor eq 'NORMARC' ) {
+    if ( $marcflavor eq 'MARC21' ) {
         $tag      = '773';
         $biblio_s = '0';
         $item_s   = '9';
@@ -1526,10 +1525,12 @@ sub _find_value {
 
 =head2 PrepareItemrecordDisplay
 
-  PrepareItemrecordDisplay($itemrecord,$bibnum,$itemumber,$frameworkcode);
+  PrepareItemrecordDisplay($bibnum,$itemumber,$defaultvalues,$frameworkcode);
 
 Returns a hash with all the fields for Display a given item data in a template
 
+$defaultvalues should either contain a hashref of values for the new item, or be undefined.
+
 The $frameworkcode returns the item for the given frameworkcode, ONLY if bibnum is not provided
 
 =cut
@@ -1758,7 +1759,7 @@ sub PrepareItemrecordDisplay {
                         name => $subfield->{value_builder},
                         item_style => 1,
                     });
-                    my $pars = { dbh => $dbh, record => undef, tagslib =>$tagslib, id => $subfield_data{id}, tabloop => undef };
+                    my $pars = { dbh => $dbh, record => undef, tagslib =>$tagslib, id => $subfield_data{id} };
                     $plugin->build( $pars );
                     if ( $itemrecord and my $field = $itemrecord->field($tag) ) {
                         $defaultvalue = $field->subfield($subfield->{subfield}) || q{};