X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=cataloguing%2Faddbiblio.pl;h=038878f39974a056df8f8f955382e1c9970f72e7;hb=99160747f48e591b482a3fcd7844d11b57f1e8db;hp=2c0c63d1c79d8c7750299b51567ce2ea61ffd0fe;hpb=a8222aeeb1169d7b1939d1e64c319a16e3846e8c;p=koha_gimpoz diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 2c0c63d1c7..038878f399 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -2,6 +2,7 @@ # Copyright 2000-2002 Katipo Communications +# Copyright 2004-2010 BibLibre # # This file is part of Koha. # @@ -188,7 +189,7 @@ sub build_authorized_values_list ($$$$$$$) { "select itemtype,description from itemtypes order by description"); $sth->execute; push @authorised_values, "" - unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); + unless ( $tagslib->{$tag}->{$subfield}->{defaultvalue} and $tagslib->{$tag}->{$subfield}->{mandatory} ); my $itemtype; @@ -757,7 +758,7 @@ AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|); my ($countcreated,$countlinked); while (my $data=$query->fetchrow_hashref){ foreach my $field ($record->field($data->{tagfield})){ - next if ($field->subfield('3')||$field->subfield('9')); + next if ($field->subfield('3') || $field->subfield('9')); # No authorities id in the tag. # Search if there is any authorities to link to. my $query='at='.$data->{authtypecode}.' '; @@ -932,8 +933,7 @@ if ( $op eq "addbiblio" ) { else { ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode ); } - - if (($mode ne "popup" && !$is_a_modif) || $redirect eq "items"){ + if ($redirect eq "items" || ($mode ne "popup" && !$is_a_modif && $redirect ne "view")){ print $input->redirect( "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode" );