From 44c44b28d4ab0fc7daf9c76c643cba6e6a204634 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 Signed-off-by: Martin Renvoize --- C4/Search.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 08f608648b..9f39b502f6 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.39.5