bug 3088: fix crash in opac-ISBDdetail.pl
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
96f990f64c
commit
33996aab95
1 changed files with 11 additions and 13 deletions
|
@ -55,9 +55,16 @@ use C4::Koha;
|
|||
use C4::Members; # GetMember
|
||||
use C4::External::Amazon;
|
||||
|
||||
my $query = new CGI;
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $query = CGI->new();
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "opac-ISBDdetail.tmpl",
|
||||
query => $query,
|
||||
type => "opac",
|
||||
authnotrequired => 1,
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
||||
my $biblionumber = $query->param('biblionumber');
|
||||
my $itemtype = &GetFrameworkCode($biblionumber);
|
||||
|
@ -84,6 +91,7 @@ $template->param(
|
|||
|
||||
#coping with subscriptions
|
||||
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
|
||||
my $dbh = C4::Context->dbh;
|
||||
my $dat = TransformMarcToKoha( $dbh, $record );
|
||||
my @subscriptions =
|
||||
GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber );
|
||||
|
@ -104,16 +112,6 @@ foreach my $subscription (@subscriptions) {
|
|||
push @subs, \%cell;
|
||||
}
|
||||
|
||||
# open template
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "opac-ISBDdetail.tmpl",
|
||||
query => $query,
|
||||
type => "opac",
|
||||
authnotrequired => 1,
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
$template->param(
|
||||
subscriptions => \@subs,
|
||||
subscriptionsnumber => $subscriptionsnumber,
|
||||
|
|
Loading…
Reference in a new issue