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

(-)a/misc/maintenance/update_localuse_from_statistics.pl (-6 / +18 lines)
Lines 27-33 use Koha::Statistics; Link Here
27
use Getopt::Long qw( GetOptions );
27
use Getopt::Long qw( GetOptions );
28
use Pod::Usage   qw( pod2usage );
28
use Pod::Usage   qw( pod2usage );
29
29
30
sub usage {
30
my ($params);
31
GetOptions(
32
    'confirm' => \$params->{confirm}, 'help' => \$params->{help}, 'age:i' => \$params->{age},
33
);
34
if ( $params->{help} ) {
31
    pod2usage( -verbose => 2 );
35
    pod2usage( -verbose => 2 );
32
    exit;
36
    exit;
33
}
37
}
Lines 57-63 my $result = GetOptions( Link Here
57
61
58
usage() if $help;
62
usage() if $help;
59
63
60
update_localuse();
64
if ( $params->{confirm} ) {
65
    update_localuse();
66
}
61
67
62
=head1 NAME
68
=head1 NAME
63
69
Lines 67-82 update_local_use_from_statistics.pl Link Here
67
73
68
  update_localuse_from_statistics.pl
74
  update_localuse_from_statistics.pl
69
  update_localuse_from_statistics.pl --help
75
  update_localuse_from_statistics.pl --help
76
  update_localuse_from_statistics.pl --confirm
70
77
71
=head1 DESCRIPTION
78
=head1 DESCRIPTION
72
79
73
This script updates the items.localuse column with data from the statistics table to make sure the two tables are congruent.
80
This script updates the items.localuse column with data from the statistics table to make sure the two tables are congruent.
74
81
75
=over 8
82
=head1 OPTIONS
83
84
=over
85
86
=item B<-h--help>
87
88
Prints this help message
76
89
77
=item B<--help>
90
=item B<-c|--confirm>
78
91
79
Prints this help
92
    Confirm to run the script.
80
93
81
=back
94
=back
82
95
83
- 

Return to bug 36709