|
Lines 113-118
sub process {
Link Here
|
| 113 |
my $upload_dir = Koha::UploadedFile->permanent_directory; |
113 |
my $upload_dir = Koha::UploadedFile->permanent_directory; |
| 114 |
|
114 |
|
| 115 |
while (my ($format, $data) = each %{$encoded_results}) { |
115 |
while (my ($format, $data) = each %{$encoded_results}) { |
|
|
116 |
$data = encode('UTF-8', $data); |
| 116 |
my $hash = md5_hex($data); |
117 |
my $hash = md5_hex($data); |
| 117 |
my $category = "search_marc_export"; |
118 |
my $category = "search_marc_export"; |
| 118 |
my $time = strftime "%Y%m%d_%H%M", localtime time; |
119 |
my $time = strftime "%Y%m%d_%H%M", localtime time; |
|
Lines 131-137
sub process {
Link Here
|
| 131 |
|
132 |
|
| 132 |
if ($fh) { |
133 |
if ($fh) { |
| 133 |
$fh->binmode; |
134 |
$fh->binmode; |
| 134 |
print $fh encode('UTF-8', $data); |
135 |
print $fh $data; |
| 135 |
$fh->close; |
136 |
$fh->close; |
| 136 |
|
137 |
|
| 137 |
my $size = -s $filepath; |
138 |
my $size = -s $filepath; |
|
Lines 159-165
sub process {
Link Here
|
| 159 |
errors => \@errors, |
160 |
errors => \@errors, |
| 160 |
query_string => $query_string, |
161 |
query_string => $query_string, |
| 161 |
}; |
162 |
}; |
| 162 |
$data->{report} = $report; |
163 |
$data->{report} = $report; |
| 163 |
if (@errors) { |
164 |
if (@errors) { |
| 164 |
$self->set({ progress => 0, status => 'failed' })->store; |
165 |
$self->set({ progress => 0, status => 'failed' })->store; |
| 165 |
} |
166 |
} |