X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=admin%2Fitemtypes.pl;h=87af801ce9d51f9cdba7b9d31f77737c25605802;hb=de03c263f0579d28a735e3b1261121e439263a82;hp=3c33073cbbb2fdf1a15faae47bbcab7d12c389fc;hpb=39a656c6ba555a542d468e47874be52223402c21;p=koha_fer diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index 3c33073cbb..87af801ce9 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -91,6 +91,9 @@ if ($op) { my $dbh = C4::Context->dbh; +my $sip_media_type = $input->param('sip_media_type'); +undef($sip_media_type) if defined($sip_media_type) and $sip_media_type =~ /^\s*$/; + ################## ADD_FORM ################################## # called by default. Used to create form to add or modify a record if ( $op eq 'add_form' ) { @@ -121,6 +124,7 @@ if ( $op eq 'add_form' ) { checkinmsgtype => $data->{'checkinmsgtype'}, imagesets => $imagesets, remote_image => $remote_image, + sip_media_type => $data->{sip_media_type}, ); # END $OP eq ADD_FORM @@ -145,6 +149,7 @@ elsif ( $op eq 'add_validate' ) { , summary = ? , checkinmsg = ? , checkinmsgtype = ? + , sip_media_type = ? WHERE itemtype = ? '; $sth = $dbh->prepare($query2); @@ -162,15 +167,16 @@ elsif ( $op eq 'add_validate' ) { $input->param('summary'), $input->param('checkinmsg'), $input->param('checkinmsgtype'), + $sip_media_type, $input->param('itemtype') ); } else { # add a new itemtype & not modif an old my $query = " INSERT INTO itemtypes - (itemtype,description,rentalcharge, notforloan, imageurl, summary, checkinmsg, checkinmsgtype) + (itemtype,description,rentalcharge, notforloan, imageurl, summary, checkinmsg, checkinmsgtype, sip_media_type) VALUES - (?,?,?,?,?,?,?,?); + (?,?,?,?,?,?,?,?,?); "; my $sth = $dbh->prepare($query); my $image = $input->param('image'); @@ -185,6 +191,7 @@ elsif ( $op eq 'add_validate' ) { $input->param('summary'), $input->param('checkinmsg'), $input->param('checkinmsgtype'), + $sip_media_type, ); }