basket.pl - conditionalized w/ $debug 3 warnings that would otherwise fire every...
authorJoe Atzberger <joe.atzberger@liblime.com>
Fri, 7 Dec 2007 23:38:27 +0000 (17:38 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 12 Dec 2007 13:55:07 +0000 (07:55 -0600)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
acqui/basket.pl

index d68bcd2..d127ca1 100755 (executable)
@@ -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 );