Bug 26854: Close STDERR when forking stage-marc-import.pl
[koha-ffzg.git] / tools / overduerules.pl
index 616f607..293c51c 100755 (executable)
@@ -30,7 +30,7 @@ use Koha::Libraries;
 
 use Koha::Patron::Categories;
 
-our $input = new CGI;
+our $input = CGI->new;
 my $dbh = C4::Context->dbh;
 
 my @patron_categories = Koha::Patron::Categories->search( { overduenoticerequired => { '>' => 0 } } );
@@ -62,7 +62,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         template_name   => "tools/overduerules.tt",
         query           => $input,
         type            => "intranet",
-        authnotrequired => 0,
         flagsrequired   => { tools => 'edit_notice_status_triggers' },
         debug           => 1,
     }
@@ -77,7 +76,6 @@ $branch =
   : Koha::Libraries->search->count() == 1                              ? undef
   :                                                                      undef;
 $branch ||= q{};
-$branch = q{} if $branch eq 'NO_LIBRARY_SET';
 
 my $op = $input->param('op');
 $op ||= q{};
@@ -216,8 +214,6 @@ my $letters = C4::Letters::GetLettersAvailableForALibrary(
     }
 );
 
-my @line_loop;
-
 my $message_transport_types = C4::Letters::GetMessageTransportTypes();
 my ( @first, @second, @third );
 for my $patron_category (@patron_categories) {