Bugzilla – Attachment 64943 Details for
Bug 14647
When exporting records, the file name extension should match the selected export format
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14647: [FOLLOW-UP] Changes to script
Bug-14647-FOLLOW-UP-Changes-to-script.patch (text/plain), 1.44 KB, created by
Aleisha Amohia
on 2017-07-10 02:09:27 UTC
(
hide
)
Description:
Bug 14647: [FOLLOW-UP] Changes to script
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-07-10 02:09:27 UTC
Size:
1.44 KB
patch
obsolete
>From efa24055240a4382e2c88dfbda143fd055e88a25 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 10 Jul 2017 02:07:38 +0000 >Subject: [PATCH] Bug 14647: [FOLLOW-UP] Changes to script > >This patch adds the necessary changes to the script so that the filename >extensions works for exporting authorities. > >To test: >1) Attempt to export with all filetypes for biblios and authorities >2) Confirm the extension for the exported file (after clicking the > Export button) is correct for each one > >Sponsored-by: Catalyst IT >--- > tools/export.pl | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/tools/export.pl b/tools/export.pl >index 72b18c4..6cf6083 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -39,7 +39,12 @@ my $record_type = $query->param("record_type"); > my $op = $query->param("op") || ''; > my $output_format = $query->param("format") || $query->param("output_format") || 'iso2709'; > my $backupdir = C4::Context->config('backupdir'); >-my $filename = $query->param("filename") || ( $output_format eq 'csv' ? 'koha.csv' : 'koha.mrc' ); >+my $filename; >+if ( $record_type eq 'auths' ) { >+ $filename = $query->param("filename_auth") || ( $output_format eq 'xml' ? 'koha.xml' : 'koha.mrc' ); >+} else { >+ $filename = $query->param("filename") || ( $output_format eq 'csv' ? 'koha.csv' : 'koha.mrc' ); >+} > $filename =~ s/(\r|\n)//; > > my $dbh = C4::Context->dbh; >-- >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 14647
:
46956
|
46963
|
47047
|
47048
|
47275
|
64943
|
98541
|
98542
|
98627
|
98631
|
98632
|
98633
|
99287
|
99288
|
99289
|
99290