Bug 20829: Handle non-existent barcode when linking to host item
[koha.git] / cataloguing / editor.pl
index 8bf9a78..0806233 100755 (executable)
@@ -18,7 +18,7 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 #
 
-use Modern::Perl '2009';
+use Modern::Perl;
 
 use CGI;
 use MARC::Record;
@@ -29,6 +29,7 @@ use C4::Context;
 use C4::Output;
 use DBIx::Class::ResultClass::HashRefInflator;
 use Koha::Database;
+use Koha::MarcSubfieldStructures;
 
 my $input = CGI->new;
 
@@ -56,6 +57,9 @@ $template->{VARS}->{editable_batches} = [ $schema->resultset('ImportBatch')->sea
 # Needed information for cataloging plugins
 $template->{VARS}->{DefaultLanguageField008} = pack( 'A3', C4::Context->preference('DefaultLanguageField008') || 'eng' );
 
+my $authtags = Koha::MarcSubfieldStructures->search({ authtypecode => { '!=' => '' }, 'frameworkcode' => '' });
+$template->{VARS}->{authtags} = $authtags;
+
 # Z39.50 servers
 my $dbh = C4::Context->dbh;
 $template->{VARS}->{z3950_servers} = $dbh->selectall_arrayref( q{