Bugzilla – Attachment 40890 Details for
Bug 14496
Improving opac-detail.pl performances
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 14496 : Improving opac-detail.pl performances
Signed-off-Bug-14496--Improving-opac-detailpl-perf.patch (text/plain), 3.05 KB, created by
Marc Véron
on 2015-07-09 15:01:27 UTC
(
hide
)
Description:
[Signed-off] Bug 14496 : Improving opac-detail.pl performances
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-07-09 15:01:27 UTC
Size:
3.05 KB
patch
obsolete
>From 4d8ccf32f3ac574553e24867fa40e29f76356262 Mon Sep 17 00:00:00 2001 >From: Julian FIOL <julian.fiol@biblibre.com> >Date: Mon, 6 Jul 2015 12:27:08 +0200 >Subject: [PATCH] [Signed-off] Bug 14496 : Improving opac-detail.pl > performances >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Get notes and subjects from MARC record >ONLY when XSLT is not activated. > >It's useless doing it when XSLT is activated, >because XSLT takes care of it by its own. > >=> With this patch, we are saving precious >milliseconds > >I compared the display of some records in XSLT view with and without patch, was the same (as expected). >Signed-off-by: Marc Véron <veron@veron.ch> >--- > opac/opac-detail.pl | 31 ++++++++++++++++++------------- > 1 file changed, 18 insertions(+), 13 deletions(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index bc9b323..0fa588f 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -703,24 +703,29 @@ if (scalar(@itemloop) == 0 || scalar(@otheritemloop) == 0) { > } > > ## get notes and subjects from MARC record >-my $dbh = C4::Context->dbh; >+if (!C4::Context->preference("OPACXSLTDetailsDisplay") ) { >+ my $marcisbnsarray = GetMarcISBN ($record,$marcflavour); >+ my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour); >+ my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour); >+ my $marcseriesarray = GetMarcSeries ($record,$marcflavour); >+ my $marcurlsarray = GetMarcUrls ($record,$marcflavour); >+ my $marchostsarray = GetMarcHosts($record,$marcflavour); >+ >+ $template->param( >+ MARCSUBJCTS => $marcsubjctsarray, >+ MARCAUTHORS => $marcauthorsarray, >+ MARCSERIES => $marcseriesarray, >+ MARCURLS => $marcurlsarray, >+ MARCISBNS => $marcisbnsarray, >+ MARCHOSTS => $marchostsarray, >+ ); >+} >+ > my $marcnotesarray = GetMarcNotes ($record,$marcflavour); >-my $marcisbnsarray = GetMarcISBN ($record,$marcflavour); >-my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour); >-my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour); >-my $marcseriesarray = GetMarcSeries ($record,$marcflavour); >-my $marcurlsarray = GetMarcUrls ($record,$marcflavour); >-my $marchostsarray = GetMarcHosts($record,$marcflavour); > my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); > > $template->param( > MARCNOTES => $marcnotesarray, >- MARCSUBJCTS => $marcsubjctsarray, >- MARCAUTHORS => $marcauthorsarray, >- MARCSERIES => $marcseriesarray, >- MARCURLS => $marcurlsarray, >- MARCISBNS => $marcisbnsarray, >- MARCHOSTS => $marchostsarray, > norequests => $norequests, > RequestOnOpac => C4::Context->preference("RequestOnOpac"), > itemdata_ccode => $itemfields{ccode}, >-- >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 14496
:
40805
|
40890
|
40914