[Koha-patches] [PATCH 30/92] Bug 3863 - Amazon Content Not Working
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Tue Dec 22 01:20:23 CET 2009
From: Frédéric Demians <f.demians at tamil.fr>
Sysprefs were not sent to templates.
---
C4/Auth.pm | 5 ++++-
opac/opac-detail.pl | 2 --
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index 608fd9b..e1f5b9a 100755
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -392,7 +392,10 @@ sub get_template_and_user {
LibraryName => "" . C4::Context->preference("LibraryName"),
LibraryNameTitle => "" . $LibraryNameTitle,
LoginBranchname => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"",
- OPACAmazonSimilarItems => "" . C4::Context->preference("OPACAmazonSimilarItems"),
+ OPACAmazonEnabled => C4::Context->preference("OPACAmazonEnabled"),
+ OPACAmazonSimilarItems => C4::Context->preference("OPACAmazonSimilarItems"),
+ OPACAmazonCoverImages => C4::Context->preference("OPACAmazonCoverImages"),
+ OPACAmazonReviews => C4::Context->preference("OPACAmazonReviews"),
OPACFRBRizeEditions => C4::Context->preference("OPACFRBRizeEditions"),
OPACItemHolds => C4::Context->preference("OPACItemHolds"),
OPACShelfBrowser => "". C4::Context->preference("OPACShelfBrowser"),
diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
index 87b2ac9..f0a7288 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -325,11 +325,9 @@ if ( C4::Context->preference("OPACAmazonEnabled") ) {
my $amazon_similars = C4::Context->preference("OPACAmazonSimilarItems");
my @services;
if ( $amazon_reviews ) {
- $template->param( OPACAmazonReviews => 1 );
push( @services, 'EditorialReview', 'Reviews' );
}
if ( $amazon_similars ) {
- $template->param( OPACAmazonSimilarItems => 1 );
push( @services, 'Similarities' );
}
my $amazon_details = &get_amazon_details( $isbn, $record, $marcflavour, \@services );
--
1.6.3.3
More information about the Koha-patches
mailing list