Teach OpenILS::WWW::AddedContent::Syndetic to pass UPC when
requesting added content from the source.
Protect against warnings when no isbn/upc provided
Protect against Perl giving us uninitialized value warnings when
isbn or upc has not been provided.
Signed-off-by: Jeff Godin <jgodin@tadl.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
my $isbn = $keys->{isbn}[0];
my $upc = $keys->{upc}[0];
- my $url = $self->base_url . "?isbn=$isbn/$page&client=$uname" . (($notype) ? '' : "&type=rw12");
+ $isbn = '' if !defined($isbn);
+ $upc = '' if !defined($upc);
+
+ my $url = $self->base_url . "?isbn=$isbn/$page&upc=$upc&client=$uname" . (($notype) ? '' : "&type=rw12");
return $AC->get_url($url);
}