View | Details | Raw Unified | Return to bug 5771
Collapse All | Expand All

(-)a/tools/import_borrowers.pl (-3 / +7 lines)
Lines 58-63 use Text::CSV; Link Here
58
use CGI;
58
use CGI;
59
# use encoding 'utf8';    # don't do this
59
# use encoding 'utf8';    # don't do this
60
60
61
my $tmpdir = '/tmp';
62
61
my (@errors, @feedback);
63
my (@errors, @feedback);
62
my $extended = C4::Context->preference('ExtendedPatronAttributes');
64
my $extended = C4::Context->preference('ExtendedPatronAttributes');
63
my $set_messaging_prefs = C4::Context->preference('EnhancedMessagingPreferences');
65
my $set_messaging_prefs = C4::Context->preference('EnhancedMessagingPreferences');
Lines 96-102 if ($input->param('report')) { Link Here
96
        -type => 'text/plain',
98
        -type => 'text/plain',
97
        -attachment => 'import_borrowers_report.txt'
99
        -attachment => 'import_borrowers_report.txt'
98
    );
100
    );
99
    open my $fh, '<', $input->param('errors_filename');
101
    my $filename = $input->param('errors_filename');
102
    $filename =~ s/\.\.//g;
103
    open my $fh, '<', $tmpdir . '/' . $filename;
100
    print $fh;
104
    print $fh;
101
    close $fh;
105
    close $fh;
102
    #TODO : We surely want to check that is it really a temp file that we are unlinking
106
    #TODO : We surely want to check that is it really a temp file that we are unlinking
Lines 366-372 if ( $uploadborrowers && length($uploadborrowers) > 0 ) { Link Here
366
            print $tmpf $output;
370
            print $tmpf $output;
367
            $template->param(
371
            $template->param(
368
                download_errors => 1,
372
                download_errors => 1,
369
                errors_filename => $tmpf->filename
373
                errors_filename => $tmpf->filename,
374
                DIR => $tmpdir,
370
            );
375
            );
371
            close $tmpf;
376
            close $tmpf;
372
        }
377
        }
373
- 

Return to bug 5771