From 4f283bc0fab1469fa994a1313869452dc7ecda3d Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Thu, 10 Apr 2008 10:41:16 +0200 Subject: [PATCH] BUGFIX : encoding problem & security problem Signed-off-by: Joshua Ferraro --- tools/export.pl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/export.pl b/tools/export.pl index aee9e32cb4..d90d7fcbff 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -32,10 +32,25 @@ my $filename=$query->param("filename"); my $dbh=C4::Context->dbh; my $marcflavour = C4::Context->preference("marcflavour"); +my ($template, $loggedinuser, $cookie) + = get_template_and_user + ( + { + template_name => "tools/export.tmpl", + query => $query, + type => "intranet", + authnotrequired => 0, + flagsrequired => {tools => 1}, + debug => 1, + } + ); + if ($op eq "export") { + binmode(STDOUT,":utf8"); print $query->header( -type => 'application/octet-stream', - -attachment=>$filename); - + -charset => 'utf-8', + -attachment=>$filename); + my $StartingBiblionumber = $query->param("StartingBiblionumber"); my $EndingBiblionumber = $query->param("EndingBiblionumber"); my $output_format = $query->param("output_format"); @@ -159,7 +174,6 @@ else { debug => 1, } ); - $template->param( branchloop => \@branchloop, itemtypeloop => \@itemtypesloop -- 2.39.5