[Koha-patches] [PATCH] BUGFIX : encoding problem & security problem
paul.poulain at biblibre.com
paul.poulain at biblibre.com
Thu Apr 10 10:41:16 CEST 2008
From: Paul POULAIN <paul.poulain at biblibre.com>
diff --git a/tools/export.pl b/tools/export.pl
index 1fb1dae..bed2fb5 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");
@@ -147,19 +162,6 @@ else {
push @branchloop, \%row;
}
- my ($template, $loggedinuser, $cookie)
- = get_template_and_user
- (
- {
- template_name => "tools/export.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {tools => 1},
- debug => 1,
- }
- );
-
$template->param(
branchloop => \@branchloop,
itemtypeloop => \@itemtypesloop
--
1.5.3.2
More information about the Koha-patches
mailing list