Link Here
|
10 |
use C4::Log; |
10 |
use C4::Log; |
11 |
use POSIX qw(strftime); |
11 |
use POSIX qw(strftime); |
12 |
|
12 |
|
13 |
my ( $help, $verbose, $force ); |
13 |
my ( $help, $verbose, $force, $quiet ); |
14 |
GetOptions( |
14 |
GetOptions( |
15 |
'h|help' => \$help, |
15 |
'h|help' => \$help, |
16 |
'v|verbose' => \$verbose, |
16 |
'v|verbose' => \$verbose, |
17 |
'f|force' => \$force, |
17 |
'f|force' => \$force, |
|
|
18 |
'q|quiet' => \$quiet, |
18 |
) || pod2usage(1); |
19 |
) || pod2usage(1); |
19 |
|
20 |
|
20 |
if ($help) { |
21 |
if ($help) { |
21 |
pod2usage(1); |
22 |
pod2usage(1); |
|
|
23 |
exit; |
22 |
} |
24 |
} |
23 |
|
25 |
|
24 |
unless ( C4::Context->preference('UsageStats') ) { |
26 |
unless ( C4::Context->preference('UsageStats') ) { |
25 |
pod2usage( |
27 |
!$quiet && pod2usage( |
26 |
q| |
28 |
q| |
27 |
The UsageStats system preference is not set. |
29 |
The UsageStats system preference is not set. |
28 |
If your library wants to share their usage statistics with the Koha community, you have to switch on this system preference |
30 |
If your library wants to share their usage statistics with the Koha community, you have to switch on this system preference |
|
|
31 |
|
32 |
Setting the quiet flag will shut up this message. |
29 |
| |
33 |
| |
30 |
); |
34 |
); |
31 |
exit 1; |
35 |
exit 1; |
Link Here
|
52 |
|
56 |
|
53 |
=head1 SYNOPSIS |
57 |
=head1 SYNOPSIS |
54 |
|
58 |
|
55 |
share_usage_with_koha_community.pl [-h|--help] [-v|--verbose] |
59 |
share_usage_with_koha_community.pl [-h|--help] [-v|--verbose] [-f|--force] [-q|--quiet] |
56 |
|
60 |
|
57 |
If the UsageStats system preference is set, you can launch this script to share your usage data |
61 |
If the UsageStats system preference is set, you can launch this script to share your usage data |
58 |
anonymously with the Koha community. |
62 |
anonymously with the Koha community. |
Link Here
|
83 |
|
87 |
|
84 |
=item B<-v|--verbose> |
88 |
=item B<-v|--verbose> |
85 |
|
89 |
|
86 |
Verbose mode. |
90 |
Verbose mode |
87 |
|
91 |
|
88 |
=item B<-f|--force> |
92 |
=item B<-f|--force> |
89 |
|
93 |
|
90 |
Force the update. |
94 |
Force the update |
|
|
95 |
|
96 |
=item B<-q|--quiet> |
97 |
|
98 |
Do not emit "The UsageStats system preference is not set" message |
91 |
|
99 |
|
92 |
=back |
100 |
=back |
93 |
|
101 |
|
94 |
- |
|
|