Skip to content

Commit

Permalink
Prevent js failure if syspref "gist" is undefined.
Browse files Browse the repository at this point in the history
The javascript is malformed and therefore fails the onsubmit check if
gist does not receive a value.  This patch allows failover to default 0.
Also removed an unused dbh.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
  • Loading branch information
Joe Atzberger authored and Galen Charlton committed Feb 2, 2009
1 parent 01230cc commit 8b402f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions acqui/neworderempty.pl
Expand Up @@ -94,7 +94,6 @@ =head1 CGI PARAMETERS
my $close = $input->param('close');
my $data;
my $new;
my $dbh = C4::Context->dbh;

if ( $ordnum eq '' ) { # create order
$new = 'yes';
Expand Down Expand Up @@ -262,7 +261,7 @@ =head1 CGI PARAMETERS
nocalc => $bookseller->{'nocalc'},
name => $bookseller->{'name'},
currency => $bookseller->{'listprice'},
gstrate => C4::Context->preference("gist"),
gstrate => C4::Context->preference("gist") || 0,
loop_currencies => \@loop_currency,
orderexists => ( $new eq 'yes' ) ? 0 : 1,
title => $data->{'title'},
Expand Down

0 comments on commit 8b402f8

Please sign in to comment.