From ca4ba92f215dd1fdf80661a3d28ff9d1876eed00 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Fri, 7 Dec 2007 17:38:27 -0600 Subject: [PATCH] basket.pl - conditionalized w/ $debug 3 warnings that would otherwise fire every time! Signed-off-by: Joshua Ferraro --- acqui/basket.pl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/acqui/basket.pl b/acqui/basket.pl index d68bcd21c5..d127ca152c 100755 --- a/acqui/basket.pl +++ b/acqui/basket.pl @@ -31,6 +31,12 @@ use C4::Bookfund; use C4::Bookseller; use C4::Dates qw/format_date/; +use vars qw($debug); + +BEGIN { + $debug = $ENV{DEBUG} || 1; +} + =head1 NAME basket.pl @@ -104,9 +110,10 @@ if ( C4::Context->preference("IndependantBranches") ) { # if new basket, pre-fill infos $basket->{creationdate} = "" unless ( $basket->{creationdate} ); $basket->{authorisedby} = $loggedinuser unless ( $basket->{authorisedby} ); -warn $loggedinuser; -warn $basket->{creationdate}; -warn $basket->{authorisedby} ; +$debug and warn + sprintf "loggedinuser: $loggedinuser; creationdate: %s; authorisedby: %s", + $basket->{creationdate}, $basket->{authorisedby} ; + my ( $count, @results ); @results = GetOrders( $basketno, $order ); -- 2.39.5