From 4141d9524c1c9c7ab6a8852e975f0c076b280dc2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 15 Mar 2016 09:08:39 +0000 Subject: [PATCH] Bug 15263: Bug 15263: (follow-up 2) XSLT display fetches sysprefs for every result processed Don't retrieve prefs if we won't need them Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall --- C4/Search.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index b33eed4ced..36c4cfa7de 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1886,8 +1886,8 @@ sub searchResults { my $interface = $search_context eq 'opac' ? 'OPAC' : ''; my $xslsyspref = $interface . "XSLTResultsDisplay"; my $xslfile = C4::Context->preference($xslsyspref); - my $lang = C4::Languages::getlanguage(); - my $sysxml = C4::XSLT::get_xslt_sysprefs(); + my $lang = $xslfile ? C4::Languages::getlanguage() : undef; + my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; # loop through all of the records we've retrieved for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) { -- 2.39.5