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

(-)a/tools/export.pl (-6 / +7 lines)
Lines 72-82 my @branch = $query->multi_param("branch"); Link Here
72
my @messages;
72
my @messages;
73
if ( $op eq 'export' ) {
73
if ( $op eq 'export' ) {
74
    my $filename = $query->param('id_list_file');
74
    my $filename = $query->param('id_list_file');
75
    my $mimetype = $query->uploadInfo($filename)->{'Content-Type'};
75
    if ( $filename ) {
76
    my @valid_mimetypes = qw( application/octet-stream text/csv text/plain );
76
        my $mimetype = $query->uploadInfo($filename)->{'Content-Type'};
77
    unless ( grep { /^$mimetype$/ } @valid_mimetypes ) {
77
        my @valid_mimetypes = qw( application/octet-stream text/csv text/plain );
78
        push @messages, { type => 'alert', code => 'invalid_mimetype' };
78
        unless ( grep { /^$mimetype$/ } @valid_mimetypes ) {
79
        $op = '';
79
            push @messages, { type => 'alert', code => 'invalid_mimetype' };
80
            $op = '';
81
        }
80
    }
82
    }
81
}
83
}
82
84
83
- 

Return to bug 18312