Bug 20564: Don't use system to unzip files
[koha_ffzg] / tools / marc_modification_templates.pl
index 3689684..f88f7d5 100755 (executable)
@@ -36,7 +36,7 @@ my ($template, $loggedinuser, $cookie)
             query => $cgi,
             type => "intranet",
             authnotrequired => 0,
-            flagsrequired => { tools => 'marc_modfication_templates' },
+            flagsrequired => { tools => 'marc_modification_templates' },
             debug => 1,
     });
 
@@ -113,14 +113,10 @@ if ( $op eq "create_template" ) {
 
 my @templates = GetModificationTemplates( $template_id );
 
-unless ( $template_id ) {
-  $template_id = $templates[0]->{'template_id'};
-  @templates = GetModificationTemplates( $template_id );
-}
-
 my @actions = GetModificationTemplateActions( $template_id );
 foreach my $action ( @actions ) {
   $action->{'action_delete_field'} = ( $action->{'action'} eq 'delete_field' );
+  $action->{'action_add_field'} = ( $action->{'action'} eq 'add_field' );
   $action->{'action_update_field'} = ( $action->{'action'} eq 'update_field' );
   $action->{'action_move_field'} = ( $action->{'action'} eq 'move_field' );
   $action->{'action_copy_field'} = ( $action->{'action'} eq 'copy_field' );