Bugzilla – Attachment 50510 Details for
Bug 15263
XSLT display fetches sysprefs for every result processed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15263: (QA followup) Make *shelves.pl use the new API
Bug-15263-QA-followup-Make-shelvespl-use-the-new-A.patch (text/plain), 3.20 KB, created by
Kyle M Hall (khall)
on 2016-04-21 13:42:40 UTC
(
hide
)
Description:
Bug 15263: (QA followup) Make *shelves.pl use the new API
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-04-21 13:42:40 UTC
Size:
3.20 KB
patch
obsolete
>From ccb73f8335a19d7ace77b13db8afe446d7a30026 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 24 Mar 2016 00:33:32 -0300 >Subject: [PATCH] Bug 15263: (QA followup) Make *shelves.pl use the new API > >This patch makes the lists work as the search results for rendering on >XSLT-driven context. No behaviour change is expected. > >To test: >- Apply the patch >- Navigate lists (OPAC and intranet) >=> SUCCESS: the only difference is speed (faster) >- Sign off :-D > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > opac/opac-shelves.pl | 9 +++++++-- > virtualshelves/shelves.pl | 9 +++++++-- > 2 files changed, 14 insertions(+), 4 deletions(-) > >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index 258044b..3dd9be6 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -248,14 +248,19 @@ if ( $op eq 'view' ) { > > my $borrower = GetMember( borrowernumber => $loggedinuser ); > >+ my $xslfile = C4::Context->preference('OPACXSLTResultsDisplay'); >+ my $lang = $xslfile ? C4::Languages::getlanguage() : undef; >+ my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; >+ > my @items; > while ( my $content = $contents->next ) { > my $this_item; > my $biblionumber = $content->biblionumber->biblionumber; > my $record = GetMarcBiblio($biblionumber); > >- if ( C4::Context->preference("OPACXSLTResultsDisplay") ) { >- $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "OPACXSLTResultsDisplay" ); >+ if ( $xslfile ) { >+ $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "OPACXSLTResultsDisplay", >+ 1, undef, $sysxml, $xslfile, $lang); > } > > my $marcflavour = C4::Context->preference("marcflavour"); >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index eab6c17..76db727 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -215,14 +215,19 @@ if ( $op eq 'view' ) { > > my $borrower = GetMember( borrowernumber => $loggedinuser ); > >+ my $xslfile = C4::Context->preference('XSLTResultsDisplay'); >+ my $lang = $xslfile ? C4::Languages::getlanguage() : undef; >+ my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; >+ > my @items; > while ( my $content = $contents->next ) { > my $this_item; > my $biblionumber = $content->biblionumber->biblionumber; > my $record = GetMarcBiblio($biblionumber); > >- if ( C4::Context->preference("XSLTResultsDisplay") ) { >- $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTResultsDisplay" ); >+ if ( $xslfile ) { >+ $this_item->{XSLTBloc} = XSLTParse4Display( $biblionumber, $record, "XSLTResultsDisplay", >+ 1, undef, $sysxml, $xslfile, $lang); > } > > my $marcflavour = C4::Context->preference("marcflavour"); >-- >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 15263
:
45221
|
48962
|
48963
|
49031
|
49159
|
49502
|
49503
|
49504
|
49505
|
50474
|
50506
|
50507
|
50508
|
50509
| 50510 |
50511