Bug Fixing Amazon.pm would not compile

missing call of C4::External::Amazon in opac-ISBDdetail.pl
@aws was not defined
This commit is contained in:
Henri-Damien LAURENT 2009-09-16 18:36:40 +02:00
parent 3c1650682f
commit fd4ed72988
2 changed files with 15 additions and 1 deletions

View File

@ -80,7 +80,11 @@ Get editorial reviews, customer reviews, and similar products using Amazon Web S
=cut
sub get_amazon_details {
my ( $isbn, $record, $marcflavour ) = @_;
my ( $isbn, $record, $marcflavour,$awsref ) = @_;
return unless defined $aws_ref;
my @aws = @$aws_ref;
return if $#aws == -1;
#normalize the ISBN
$isbn = _normalize_match_point ($isbn);

View File

@ -51,6 +51,7 @@ use CGI;
use MARC::Record;
use C4::Biblio;
use C4::Acquisition;
use C4::External::Amazon;
use C4::Review;
use C4::Serials; # uses getsubscriptionfrom biblionumber
use C4::Koha; # use getitemtypeinfo
@ -116,6 +117,15 @@ $template->param(
biblionumber => $biblionumber,
reviews => $reviews,
);
my @services;
if ( $amazon_reviews ) {
$template->param( AmazonReviews => 1 );
push( @services, 'EditorialReview' );
}
if ( $amazon_similars ) {
$template->param( AmazonSimilarItems => 1 );
push( @services, 'Similarities' );
}
## Amazon.com stuff
#not used unless preference set