# cleaning
[koha_ffzg] / admin / koha2marclinks.pl
index 102cd0e..070e44b 100755 (executable)
@@ -20,6 +20,8 @@
 
 use strict;
 use C4::Output;
+use C4::Charset;
+use C4::Auth;
 use CGI;
 use C4::Search;
 use C4::Context;
@@ -33,7 +35,14 @@ my $kohafield = $input->param('kohafield');
 my $op=$input->param('op');
 my $script_name = 'koha2marclinks.pl';
 
-my $template = gettemplate("parameters/koha2marclinks.tmpl",0);
+my ($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "parameters/koha2marclinks.tmpl",
+                            query => $input,
+                            type => "intranet",
+                            authnotrequired => 0,
+                            flagsrequired => {parameters => 1},
+                            debug => 1,
+                            });
 
 if ($op) {
 $template->param(script_name => $script_name,
@@ -59,7 +68,6 @@ if ($op eq 'add_form') {
                my @marcarray;
                push @marcarray," ";
                while (my ($field, $tagsubfield, $liblibrarian) = $sth2->fetchrow_array) {
-       #               warn "$field$tagsubfield - $liblibrarian";
                        push @marcarray, "$field $tagsubfield - $liblibrarian";
                }
                my $marclist = CGI::scrolling_list(-name=>"marc",
@@ -127,4 +135,7 @@ if ($op eq 'add_form') {
                                                        );
 } #---- END $OP eq DEFAULT
 
-print "Content-Type: text/html\n\n", $template->output;
+print $input->header(
+    -type => guesstype($template->output),
+    -cookie => $cookie
+), $template->output;