From 2def8ccbf681b47d396ef0dd1bdd3e31a800bf97 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 21 Sep 2019 11:33:47 +0000 Subject: [PATCH] Bug 23663: Only process itemtype summary if using non-xslt opac results To test: 1 - Set OpacXSLTResultsDisplay to "" to use non-xslt view 2 - In Administration->Itemtypes define a summary for an itemtype: This is the summary for [245a] 3 - Perform a search on the opac that will return results with this itemtype 4 - Note "This is the summary" appears in results with the title 5 - Set OPACXSLTResultsDisplay to 'default' 6 - Refresh your search results, note the summary disappears 7 - Try search in other places and note that summary never appears 8 - Apply patch 9 - Repeat 1-7 and note nothing changed Signed-off-by: Katrin Fischer --- C4/Search.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 65f514498f..81437f0173 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1953,8 +1953,9 @@ sub searchResults { $oldbiblio->{edition} = $oldbiblio->{editionstatement}; $oldbiblio->{description} = $itemtypes{ $oldbiblio->{itemtype} }->{translated_description}; # Build summary if there is one (the summary is defined in the itemtypes table) - # FIXME: is this used anywhere, I think it can be commented out? -- JF - if ( $itemtypes{ $oldbiblio->{itemtype} }->{summary} ) { + + # FIXME: this is only used in the deprecated non-XLST opac results + if ( !$xslfile && $is_opac && $itemtypes{ $oldbiblio->{itemtype} }->{summary} ) { my $summary = $itemtypes{ $oldbiblio->{itemtype} }->{summary}; my @fields = $marcrecord->fields(); -- 2.11.0