X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=cataloguing%2Faddbiblio.pl;h=1e7cb61897378e923ed1d5abd6597c289755a32c;hb=1bc34e31e9c371d8f60a074f13e933d15a31e20e;hp=b6805c94fe32095882bdf0ca9d3c2364efc36216;hpb=7030945d6c81934fb333486da6951e320df4e782;p=koha.git diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index b6805c94fe..1e7cb61897 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -30,11 +30,12 @@ use C4::AuthoritiesMarc; use C4::Context; use MARC::Record; use C4::Log; -use C4::Koha; # XXX subfield_is_koha_internal_p -use C4::Branch; # XXX subfield_is_koha_internal_p +use C4::Koha; +use C4::Branch; use C4::ClassSource; use C4::ImportBatch; use C4::Charset; +use Koha::BiblioFrameworks; use Date::Calc qw(Today); use MARC::File::USMARC; @@ -745,22 +746,8 @@ if ($frameworkcode eq 'FA'){ print $input->redirect( '/cgi-bin/koha/cataloguing/editor.pl' . ( $biblionumber ? ( '#catalog/' . $biblionumber ) : '' ) ); } - -# Getting the list of all frameworks -# get framework list -my $frameworks = getframeworks; -my @frameworkcodeloop; -foreach my $thisframeworkcode ( keys %$frameworks ) { - my %row = ( - value => $thisframeworkcode, - frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, - ); - if ($frameworkcode eq $thisframeworkcode){ - $row{'selected'} = 1; - } - push @frameworkcodeloop, \%row; -} -$template->param( frameworkcodeloop => \@frameworkcodeloop, +my $frameworkcodeloop = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] }); +$template->param( frameworkcodeloop => $frameworkcodeloop , breedingid => $breedingid ); # ++ Global @@ -833,8 +820,8 @@ if ( $op eq "addbiblio" ) { biblionumberdata => $biblionumber, ); # getting html input - my @params = $input->param(); - $record = TransformHtmlToMarc( $input ); + my @params = $input->multi_param(); + $record = TransformHtmlToMarc( $input, 1 ); # check for a duplicate my ( $duplicatebiblionumber, $duplicatetitle ); if ( !$is_a_modif ) { @@ -948,7 +935,7 @@ elsif ( $op eq "delete" ) { } if($changed_framework eq "changed"){ - $record = TransformHtmlToMarc( $input ); + $record = TransformHtmlToMarc( $input, 1 ); } elsif( $record ne -1 ) { #FIXME: it's kind of silly to go from MARC::Record to MARC::File::XML and then back again just to fix the encoding @@ -982,7 +969,7 @@ $template->param( frameworkcode => $frameworkcode, itemtype => $frameworkcode, borrowernumber => $loggedinuser, - tab => $input->param('tab') + tab => scalar $input->param('tab') ); $template->{'VARS'}->{'searchid'} = $searchid;