View | Details | Raw Unified | Return to bug 29238
Collapse All | Expand All

(-)a/misc/cronjobs/merge_authorities.pl (+3 lines)
Lines 7-18 use Time::HiRes qw( gettimeofday ); Link Here
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
use C4::AuthoritiesMarc qw( GetAuthority merge );
9
use C4::AuthoritiesMarc qw( GetAuthority merge );
10
use C4::Log qw( cronlogaction );
10
use Koha::Authority::MergeRequests;
11
use Koha::Authority::MergeRequests;
11
12
12
use constant RESET_HOURS => 24;
13
use constant RESET_HOURS => 24;
13
use constant REMOVE_DAYS => 30;
14
use constant REMOVE_DAYS => 30;
14
15
15
my ( $params );
16
my ( $params );
17
my $command_line_options = join(" ", @ARGV);
16
GetOptions(
18
GetOptions(
17
    'h' => \$params->{help},
19
    'h' => \$params->{help},
18
    'v' => \$params->{verbose},
20
    'v' => \$params->{verbose},
Lines 21-26 GetOptions( Link Here
21
23
22
$|=1; # flushes output
24
$|=1; # flushes output
23
if ( $params->{batch} ) {
25
if ( $params->{batch} ) {
26
    cronlogaction( { info => $command_line_options } );
24
    handle_batch($params);
27
    handle_batch($params);
25
} else {
28
} else {
26
    pod2usage(1);
29
    pod2usage(1);
(-)a/misc/link_bibs_to_authorities.pl (+4 lines)
Lines 24-29 use C4::Biblio qw( Link Here
24
    LinkBibHeadingsToAuthorities
24
    LinkBibHeadingsToAuthorities
25
    ModBiblio
25
    ModBiblio
26
);
26
);
27
use C4::Log qw( cronlogaction );
27
use Koha::Biblios;
28
use Koha::Biblios;
28
use Getopt::Long qw( GetOptions );
29
use Getopt::Long qw( GetOptions );
29
use Pod::Usage qw( pod2usage );
30
use Pod::Usage qw( pod2usage );
Lines 53-58 my $commit = 100; Link Here
53
my $tagtolink;
54
my $tagtolink;
54
my $allowrelink = C4::Context->preference("LinkerRelink") // '';
55
my $allowrelink = C4::Context->preference("LinkerRelink") // '';
55
56
57
my $command_line_options = join(" ", @ARGV);
56
my $result = GetOptions(
58
my $result = GetOptions(
57
    'v|verbose'      => \$verbose,
59
    'v|verbose'      => \$verbose,
58
    't|test'         => \$test_only,
60
    't|test'         => \$test_only,
Lines 70-75 if ( not $result or $want_help ) { Link Here
70
    usage();
72
    usage();
71
}
73
}
72
74
75
cronlogaction( { info => $command_line_options } );
76
73
my $linker_module =
77
my $linker_module =
74
  "C4::Linker::" . ( C4::Context->preference("LinkerModule") || 'Default' );
78
  "C4::Linker::" . ( C4::Context->preference("LinkerModule") || 'Default' );
75
unless ( can_load( modules => { $linker_module => undef } ) ) {
79
unless ( can_load( modules => { $linker_module => undef } ) ) {
(-)a/misc/migration_tools/remove_unused_authorities.pl (-1 / +5 lines)
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
- 

Return to bug 29238