Bugzilla – Attachment 27405 Details for
Bug 5771
Better error handling for import borrowers - Provide a download file of errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5771: Set the directory path to /tmp
Bug-5771-Set-the-directory-path-to-tmp.patch (text/plain), 1.62 KB, created by
Jonathan Druart
on 2014-04-22 15:07:01 UTC
(
hide
)
Description:
Bug 5771: Set the directory path to /tmp
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-04-22 15:07:01 UTC
Size:
1.62 KB
patch
obsolete
>From f215161183d39fb415070704b45dffd252c20062 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 22 Apr 2014 17:05:45 +0200 >Subject: [PATCH] Bug 5771: Set the directory path to /tmp > >The report filename should be written into /tmp >--- > tools/import_borrowers.pl | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl >index 8aabe4e..97d63ea 100755 >--- a/tools/import_borrowers.pl >+++ b/tools/import_borrowers.pl >@@ -58,6 +58,8 @@ use Text::CSV; > use CGI; > # use encoding 'utf8'; # don't do this > >+my $tmpdir = '/tmp'; >+ > my (@errors, @feedback); > my $extended = C4::Context->preference('ExtendedPatronAttributes'); > my $set_messaging_prefs = C4::Context->preference('EnhancedMessagingPreferences'); >@@ -96,7 +98,9 @@ if ($input->param('report')) { > -type => 'text/plain', > -attachment => 'import_borrowers_report.txt' > ); >- open my $fh, '<', $input->param('errors_filename'); >+ my $filename = $input->param('errors_filename'); >+ $filename =~ s/\.\.//g; >+ open my $fh, '<', $tmpdir . '/' . $filename; > print $fh; > close $fh; > #TODO : We surely want to check that is it really a temp file that we are unlinking >@@ -366,7 +370,8 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { > print $tmpf $output; > $template->param( > download_errors => 1, >- errors_filename => $tmpf->filename >+ errors_filename => $tmpf->filename, >+ DIR => $tmpdir, > ); > close $tmpf; > } >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5771
:
3177
|
4589
|
10023
|
19263
|
24858
|
25004
|
25019
|
26204
|
27278
| 27405