Bug 7076: Lists render OPAC XSLT on staff side
authorIan Walls <ian.walls@bywatersolutions.com>
Fri, 21 Oct 2011 15:43:17 +0000 (11:43 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 4 Nov 2011 09:35:28 +0000 (10:35 +0100)
Adds a small check in C4::VirtualShelves::Page::shelfpage to only render
OPACResultsXSLT if the $type is 'opac'.  Since parsing the XML is such an expensive
thing, and the resulting XSLTBloc is not used on the staff side, this will increase
performance for Lists in the intranet

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/VirtualShelves/Page.pm

index 161a7aa..8a17182 100644 (file)
@@ -209,7 +209,7 @@ sub shelfpage ($$$$$) {
                     my $record = GetMarcBiblio($biblionumber);
                     $this_item->{XSLTBloc} =
                         XSLTParse4Display($biblionumber, $record, 'Results', 'opac')
-                            if C4::Context->preference("OPACXSLTResultsDisplay");
+                            if C4::Context->preference("OPACXSLTResultsDisplay") && $type eq 'opac';
 
                     # the virtualshelfcontents table does not store these columns nor are they retrieved from the items
                     # and itemtypes tables, so I'm commenting them out for now to quiet the log -crn