Bug 42714: Add missing use Koha::Script -cron to cron scripts
Add Koha::Script -cron to restrict_patrons_with_failed_notices.pl and sftp_file.pl which used cronlogaction directly without importing Koha::Script. Remove their now-redundant manual calls. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
996aefd280
commit
b9ec31fe7b
|
|
@ -21,16 +21,13 @@ use Modern::Perl;
|
|||
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
use C4::Log;
|
||||
use Koha::Script -cron;
|
||||
|
||||
use C4::Context;
|
||||
use Koha::Patrons;
|
||||
use C4::Letters;
|
||||
use Koha::Notice::Message;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
# Getting options
|
||||
my ( $help, $verbose, $confirm );
|
||||
GetOptions(
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
use Modern::Perl;
|
||||
use C4::Context;
|
||||
use Net::SFTP::Foreign;
|
||||
use C4::Log qw( cronlogaction );
|
||||
use Koha::Email;
|
||||
use Koha::Script -cron;
|
||||
use Getopt::Long qw( GetOptions );
|
||||
use Pod::Usage qw( pod2usage );
|
||||
use Carp qw( carp );
|
||||
|
|
@ -126,9 +126,6 @@ my $status_email = undef;
|
|||
my $status_email_message = undef;
|
||||
my $sftp_status = undef;
|
||||
|
||||
my $command_line_options = join( " ", @ARGV );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
GetOptions(
|
||||
'help|?' => \$help,
|
||||
'm|man' => \$man,
|
||||
|
|
@ -218,4 +215,3 @@ if ($email) {
|
|||
) or warn "can't enqueue letter " . $status_email->{code};
|
||||
}
|
||||
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
|
|
|||
Loading…
Reference in New Issue