Bugzilla – Attachment 61323 Details for
Bug 18301
export_records.pl from the tools menu fails with the message Internal Server Error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18301: export_records.pl from the tools menu fails with the message Internal Server
Bug-18301-exportrecordspl-from-the-tools-menu-fail.patch (text/plain), 1.55 KB, created by
Marc Véron
on 2017-03-20 15:00:49 UTC
(
hide
)
Description:
Bug 18301: export_records.pl from the tools menu fails with the message Internal Server
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-03-20 15:00:49 UTC
Size:
1.55 KB
patch
obsolete
>From f181b71908fcdc59069b97a96ec8b36577053f8b Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Mon, 20 Mar 2017 15:56:59 +0100 >Subject: [PATCH] Bug 18301: export_records.pl from the tools menu fails with > the message Internal Server > >To reproduce: >- Go to Home > Tools > Export data >- Choose tab 'Export bibliographic records' or 'Export authority records' >- Click 'Export (...)' > >Result for both: >'Internal server error' > >To test: >- Apply patch >- Try to reproduce error >- Test export with and without 'Use a file' >--- > tools/export.pl | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/tools/export.pl b/tools/export.pl >index ecf4a04..1f1eebe 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -72,11 +72,13 @@ my @branch = $query->multi_param("branch"); > my @messages; > if ( $op eq 'export' ) { > my $filename = $query->param('id_list_file'); >- my $mimetype = $query->uploadInfo($filename)->{'Content-Type'}; >- my @valid_mimetypes = qw( application/octet-stream text/csv text/plain ); >- unless ( grep { /^$mimetype$/ } @valid_mimetypes ) { >- push @messages, { type => 'alert', code => 'invalid_mimetype' }; >- $op = ''; >+ if ( $filename ) { >+ my $mimetype = $query->uploadInfo($filename)->{'Content-Type'}; >+ my @valid_mimetypes = qw( application/octet-stream text/csv text/plain ); >+ unless ( grep { /^$mimetype$/ } @valid_mimetypes ) { >+ push @messages, { type => 'alert', code => 'invalid_mimetype' }; >+ $op = ''; >+ } > } > } > >-- >2.1.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 18301
: 61323