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;
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
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 ) {
}
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
frameworkcode => $frameworkcode,
itemtype => $frameworkcode,
borrowernumber => $loggedinuser,
- tab => $input->param('tab')
+ tab => scalar $input->param('tab')
);
$template->{'VARS'}->{'searchid'} = $searchid;