[Koha-patches] [PATCH] Bug 3863 - Amazon Content Not Working

Frédéric Demians f.demians at tamil.fr
Sat Dec 5 14:15:33 CET 2009


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 fdd1b87..988c8cb 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.4.3




More information about the Koha-patches mailing list