Bugzilla – Attachment 53631 Details for
Bug 15451
Move the CSV related code to Koha::CsvProfile[s]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15451: (followup) fix filename extension for csv file
Bug-15451-followup-fix-filename-extension-for-csv-.patch (text/plain), 1.75 KB, created by
Marcel de Rooy
on 2016-07-22 07:26:46 UTC
(
hide
)
Description:
Bug 15451: (followup) fix filename extension for csv file
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-07-22 07:26:46 UTC
Size:
1.75 KB
patch
obsolete
>From 8747e095250709b388c32c18501c3bba516b256a Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Wed, 27 Apr 2016 22:28:08 -0300 >Subject: [PATCH] Bug 15451: (followup) fix filename extension for csv file >Content-Type: text/plain; charset=utf-8 > >This patch does the same as basket/downloadcart.pl >to set '.csv' as filename extension for downloadshelf.pl > >To test: >1) Define a CSV MARC profile >2) On staff download a list, extension is '.NN' >with 'NN' the CSV profile id. >3) Apply the patch >4) Download again, check extension is now '.csv' > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > virtualshelves/downloadshelf.pl | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/virtualshelves/downloadshelf.pl b/virtualshelves/downloadshelf.pl >index 4d1bde2..d988161 100755 >--- a/virtualshelves/downloadshelf.pl >+++ b/virtualshelves/downloadshelf.pl >@@ -83,6 +83,10 @@ if ($shelfid && $format) { > } > } > } >+ >+ # If it was a CSV export we change the format after the export so the file extension is fine >+ $format = "csv" if ($format =~ m/^\d+$/); >+ > print $query->header( > -type => 'application/octet-stream', > -'Content-Transfer-Encoding' => 'binary', >@@ -95,9 +99,6 @@ if ($shelfid && $format) { > } else { > push @messages, { type => 'error', code => 'does_not_exist' }; > } >- >- # If it was a CSV export we change the format after the export so the file extension is fine >- $format = "csv" if ($format =~ m/^\d+$/); > } > else { > $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]); >-- >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 15451
:
46108
|
46109
|
46110
|
46111
|
46112
|
46113
|
46114
|
46306
|
50178
|
50179
|
50180
|
50181
|
50182
|
50183
|
50184
|
50185
|
50860
|
50861
|
50862
|
50863
|
50864
|
50865
|
50866
|
50867
|
50868
|
50985
|
53623
|
53624
|
53625
|
53626
|
53627
|
53628
|
53629
|
53630
| 53631 |
53641