Bugzilla – Attachment 21382 Details for
Bug 10853
Create CSV profiles with sql fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10853: All existing routing to get a CSV should return a marc csv
PASSED-QA-Bug-10853-All-existing-routing-to-get-a-.patch (text/plain), 4.50 KB, created by
Katrin Fischer
on 2013-09-23 20:27:27 UTC
(
hide
)
Description:
[PASSED QA] Bug 10853: All existing routing to get a CSV should return a marc csv
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-09-23 20:27:27 UTC
Size:
4.50 KB
patch
obsolete
>From e051a00253f5d0f82ad6c852e98e56dd443e4805 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 23 Sep 2013 14:58:58 +0200 >Subject: [PATCH] [PASSED QA] Bug 10853: All existing routing to get a CSV > should return a marc csv > >Test plan: >Verify that existing csv lists list marc csv profiles and not sql csv >profiles. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > C4/Csv.pm | 9 +++++++-- > C4/VirtualShelves/Page.pm | 2 +- > basket/basket.pl | 2 +- > basket/downloadcart.pl | 2 +- > opac/opac-downloadcart.pl | 2 +- > opac/opac-downloadshelf.pl | 2 +- > virtualshelves/downloadshelf.pl | 2 +- > 7 files changed, 13 insertions(+), 8 deletions(-) > >diff --git a/C4/Csv.pm b/C4/Csv.pm >index 13ab1a4..511540c 100644 >--- a/C4/Csv.pm >+++ b/C4/Csv.pm >@@ -98,12 +98,17 @@ sub GetMarcFieldsForCsv { > > # Returns informations aboout csv profiles suitable for html templates > sub GetCsvProfilesLoop { >- # List of existing profiles >+ my ( $type ) = @_; >+ # List of existing profiles > my $dbh = C4::Context->dbh; > my $sth; > my $query = "SELECT export_format_id, profile FROM export_format"; >+ if ( $type ) { >+ $query .= " WHERE type = ?"; >+ } >+ > $sth = $dbh->prepare($query); >- $sth->execute(); >+ $sth->execute( $type ? $type : () ); > return $sth->fetchall_arrayref({}); > > } >diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm >index 7756d92..259e12d 100644 >--- a/C4/VirtualShelves/Page.pm >+++ b/C4/VirtualShelves/Page.pm >@@ -458,7 +458,7 @@ sub shelfpage { > shelvesloopall => [ ( @shelvesloop, @shelveslooppriv ) ], > numberCanManage => $numberCanManage, > "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1, >- csv_profiles => GetCsvProfilesLoop() >+ csv_profiles => GetCsvProfilesLoop('marc') > ); > if ( $shelfnumber > or $shelves >diff --git a/basket/basket.pl b/basket/basket.pl >index d33216c..04f28de 100755 >--- a/basket/basket.pl >+++ b/basket/basket.pl >@@ -121,7 +121,7 @@ my $resultsarray = \@results; > > $template->param( > BIBLIO_RESULTS => $resultsarray, >- csv_profiles => GetCsvProfilesLoop(), >+ csv_profiles => GetCsvProfilesLoop('marc'), > bib_list => $bib_list, > ); > >diff --git a/basket/downloadcart.pl b/basket/downloadcart.pl >index 392a3e4..ca64c60 100755 >--- a/basket/downloadcart.pl >+++ b/basket/downloadcart.pl >@@ -89,7 +89,7 @@ if ($bib_list && $format) { > print $output; > > } else { >- $template->param(csv_profiles => GetCsvProfilesLoop()); >+ $template->param(csv_profiles => GetCsvProfilesLoop('marc')); > $template->param(bib_list => $bib_list); > output_html_with_http_headers $query, $cookie, $template->output; > } >diff --git a/opac/opac-downloadcart.pl b/opac/opac-downloadcart.pl >index 3a4cdc1..12d6777 100755 >--- a/opac/opac-downloadcart.pl >+++ b/opac/opac-downloadcart.pl >@@ -89,7 +89,7 @@ if ($bib_list && $format) { > print $output; > > } else { >- $template->param(csv_profiles => GetCsvProfilesLoop()); >+ $template->param(csv_profiles => GetCsvProfilesLoop('marc')); > $template->param(bib_list => $bib_list); > output_html_with_http_headers $query, $cookie, $template->output; > } >diff --git a/opac/opac-downloadshelf.pl b/opac/opac-downloadshelf.pl >index 662eb25..e94b76c 100755 >--- a/opac/opac-downloadshelf.pl >+++ b/opac/opac-downloadshelf.pl >@@ -94,7 +94,7 @@ if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $sh > print $output; > > } else { >- $template->param(csv_profiles => GetCsvProfilesLoop()); >+ $template->param(csv_profiles => GetCsvProfilesLoop('marc')); > $template->param(shelfid => $shelfid); > output_html_with_http_headers $query, $cookie, $template->output; > } >diff --git a/virtualshelves/downloadshelf.pl b/virtualshelves/downloadshelf.pl >index 1f6ddd9..5c59f79 100755 >--- a/virtualshelves/downloadshelf.pl >+++ b/virtualshelves/downloadshelf.pl >@@ -88,7 +88,7 @@ if ($shelfid && $format) { > print $output; > } > else { >- $template->param(csv_profiles => GetCsvProfilesLoop()); >+ $template->param(csv_profiles => GetCsvProfilesLoop('marc')); > $template->param(shelfid => $shelfid); > output_html_with_http_headers $query, $cookie, $template->output; > } >-- >1.7.9.5
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 10853
:
20956
|
21183
|
21301
|
21302
|
21373
|
21380
|
21381
| 21382