modrequest.pl did not previously have auth checking, security bug!
[koha_ffzg] / acqui / basket.pl
index 39432b5..d127ca1 100755 (executable)
@@ -26,12 +26,16 @@ use C4::Auth;
 use C4::Koha;
 use C4::Output;
 use CGI;
-
-
 use C4::Acquisition;
 use C4::Bookfund;
 use C4::Bookseller;
-use C4::Dates;
+use C4::Dates qw/format_date/;
+
+use vars qw($debug);
+
+BEGIN {
+       $debug = $ENV{DEBUG} || 1;
+}
 
 =head1 NAME
 
@@ -106,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 );