From 7de93a4093bbb0169635a6f0cdbfdf337e9f0508 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Tue, 16 Mar 2010 13:48:59 +1300 Subject: [PATCH] Fixes for syndetics, some variables needed by the template were not being set Signed-off-by: Galen Charlton --- opac/opac-detail.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index f6c56c82bf..db4939e2ee 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -364,9 +364,11 @@ if ( C4::Context->preference("OPACAmazonEnabled") ) { my $syndetics_elements; if ( C4::Context->preference("SyndeticsEnabled") ) { + $template->param("SyndeticsEnabled" => 1); + $template->param("SyndeticsClientCode" => C4::Context->preference("SyndeticsClientCode")); eval { - $syndetics_elements = &get_syndetics_index($isbn,$upc,$oclc); - for my $element (values %$syndetics_elements) { + $syndetics_elements = &get_syndetics_index($isbn,$upc,$oclc); + for my $element (values %$syndetics_elements) { $template->param("Syndetics$element"."Exists" => 1 ); #warn "Exists: "."Syndetics$element"."Exists"; } @@ -378,8 +380,8 @@ if ( C4::Context->preference("SyndeticsEnabled") && C4::Context->preference("SyndeticsSummary") && ( exists($syndetics_elements->{'SUMMARY'}) || exists($syndetics_elements->{'AVSUMMARY'}) ) ) { eval { - my $syndetics_summary = &get_syndetics_summary($isbn,$upc,$oclc, $syndetics_elements); - $template->param( SYNDETICS_SUMMARY => $syndetics_summary ); + my $syndetics_summary = &get_syndetics_summary($isbn,$upc,$oclc, $syndetics_elements); + $template->param( SYNDETICS_SUMMARY => $syndetics_summary ); }; warn $@ if $@; -- 2.39.5