|
Lines 25-36
use Modern::Perl;
Link Here
|
| 25 |
use Koha::Script; |
25 |
use Koha::Script; |
| 26 |
use C4::Context; |
26 |
use C4::Context; |
| 27 |
use C4::AuthoritiesMarc qw( DelAuthority ); |
27 |
use C4::AuthoritiesMarc qw( DelAuthority ); |
|
|
28 |
use C4::Log qw( cronlogaction ); |
| 28 |
use Getopt::Long qw( GetOptions ); |
29 |
use Getopt::Long qw( GetOptions ); |
| 29 |
|
30 |
|
| 30 |
use Koha::SearchEngine::Search; |
31 |
use Koha::SearchEngine::Search; |
| 31 |
|
32 |
|
| 32 |
my @authtypes; |
33 |
my @authtypes; |
| 33 |
my ($confirm, $test, $want_help); |
34 |
my ($confirm, $test, $want_help); |
|
|
35 |
my $command_line_options = join(" ", @ARGV); |
| 34 |
GetOptions( |
36 |
GetOptions( |
| 35 |
'aut|authtypecode:s' => \@authtypes, |
37 |
'aut|authtypecode:s' => \@authtypes, |
| 36 |
'c|confirm' => \$confirm, |
38 |
'c|confirm' => \$confirm, |
|
Lines 42-47
if ( $want_help || !($test || $confirm) ) {
Link Here
|
| 42 |
print_usage(); |
44 |
print_usage(); |
| 43 |
exit 0; |
45 |
exit 0; |
| 44 |
} |
46 |
} |
|
|
47 |
|
| 48 |
cronlogaction( { info => $command_line_options } ); |
| 49 |
|
| 45 |
if ($test) { |
50 |
if ($test) { |
| 46 |
print "*** Testing only, authorities will not be deleted. ***\n"; |
51 |
print "*** Testing only, authorities will not be deleted. ***\n"; |
| 47 |
} |
52 |
} |
| 48 |
- |
|
|