Bug 17600: Standardize our EXPORT_OK
[srvgit] / opac / sco / sco-main.pl
index 111e3a2..40d5915 100755 (executable)
@@ -35,14 +35,11 @@ use Modern::Perl;
 
 use CGI qw ( -utf8 );
 
-use C4::Auth qw(get_template_and_user checkpw in_iprange);
-use C4::Koha;
-use C4::Circulation;
+use C4::Auth qw( in_iprange get_template_and_user checkpw );
+use C4::Circulation qw( AddReturn CanBookBeIssued AddIssue CanBookBeRenewed AddRenewal );
 use C4::Reserves;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
 use C4::Members;
-use C4::Biblio;
-use C4::Items;
 use Koha::DateUtils qw( dt_from_string );
 use Koha::Acquisition::Currencies;
 use Koha::Items;
@@ -51,7 +48,7 @@ use Koha::Patron::Images;
 use Koha::Patron::Messages;
 use Koha::Token;
 
-my $query = new CGI;
+my $query = CGI->new;
 
 unless (C4::Context->preference('WebBasedSelfCheck')) {
     # redirect to OPAC home if self-check is not enabled
@@ -81,7 +78,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         flagsrequired   => { self_check => "self_checkout_module" },
         query           => $query,
         type            => "opac",
-        debug           => 1,
     }
 );
 
@@ -268,7 +264,7 @@ if ( $patron && ( $op eq 'renew' ) ) {
     my ($status,$renewerror) = CanBookBeRenewed( $borrower->{borrowernumber}, $item->itemnumber );
     if ($status) {
         #warn "renewing";
-        AddRenewal( $borrower->{borrowernumber}, $item->itemnumber );
+        AddRenewal( $borrower->{borrowernumber}, $item->itemnumber, undef, undef, undef, undef, 1 );
         push @newissueslist, $barcode;
         $template->param( renewed => 1 );
     }