X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=authorities%2Fauthorities.pl;h=23653f6a94fe3904a27e35137e7711f08bc22044;hb=6fe73327d62852446204d580f98cfb9d124a80ab;hp=9429a5820a9977ec1f0be42d441328d9f91f5f6a;hpb=6ea5246661fa5e6f172c60cdec86b2a6e9e49e9d;p=koha_gimpoz diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 9429a5820a..23653f6a94 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -47,7 +47,7 @@ builds list, depending on authorised value... =cut -sub build_authorized_values_list ($$$$$$$) { +sub build_authorized_values_list { my ( $tag, $subfield, $value, $dbh, $authorised_values_sth,$index_tag,$index_subfield ) = @_; my @authorised_values; @@ -204,7 +204,7 @@ sub create_input { } elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) { - # opening plugin. Just check wether we are on a developper computer on a production one + # opening plugin. Just check whether we are on a developer computer on a production one # (the cgidir differs) my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder"; unless (-r $cgidir and -d $cgidir) { @@ -321,11 +321,11 @@ Create a random value to set it into the input name =cut -sub CreateKey(){ +sub CreateKey { return int(rand(1000000)); } -sub build_tabs ($$$$$) { +sub build_tabs { my ( $template, $record, $dbh, $encoding,$input ) = @_; # fill arrays @@ -499,7 +499,7 @@ sub build_tabs ($$$$$) { } -sub build_hidden_data () { +sub build_hidden_data { # build hidden data => # we store everything, even if we show only requested subfields. @@ -545,7 +545,9 @@ my $linkid=$input->param('linkid'); my $authtypecode = $input->param('authtypecode'); my $dbh = C4::Context->dbh; -$authtypecode = &GetAuthTypeCode($authid) if !$authtypecode; +if(!$authtypecode) { + $authtypecode = $authid? &GetAuthTypeCode($authid): ''; +} my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "authorities/authorities.tmpl", @@ -579,8 +581,7 @@ if ($op eq "add") { # build indicator hash. my @ind_tag = $input->param('ind_tag'); my @indicator = $input->param('indicator'); - my @params = $input->param(); - my $record = TransformHtmlToMarc(\@params,$input); + my $record = TransformHtmlToMarc($input); if (C4::Context->preference("marcflavour") eq "UNIMARC"){ unless ($record->field('100')){ use POSIX qw(strftime);