|
Lines 26-37
use Koha::PseudonymizedTransactions;
Link Here
|
| 26 |
|
26 |
|
| 27 |
use C4::Context; |
27 |
use C4::Context; |
| 28 |
|
28 |
|
| 29 |
my ( $help, $verbose, $before ); |
29 |
my ( $help, $verbose, $before, $confirm ); |
| 30 |
my $result = GetOptions( |
30 |
my $result = GetOptions( |
| 31 |
'h|help' => \$help, |
31 |
'h|help' => \$help, |
| 32 |
'v|verbose' => \$verbose, |
32 |
'v|verbose' => \$verbose, |
| 33 |
'b|before:s' => \$before, |
33 |
'b|before:s' => \$before, |
| 34 |
) || pod2usage(1); |
34 |
'c|confirm' => \$confirm, |
|
|
35 |
) || pod2usage(0); |
| 35 |
|
36 |
|
| 36 |
if ($help) { |
37 |
if ($help) { |
| 37 |
pod2usage(0); |
38 |
pod2usage(0); |
|
Lines 60-65
if ( $statistics->count && $existing_pseudo_stats ) {
Link Here
|
| 60 |
exit unless uc($continue) eq 'Y'; |
61 |
exit unless uc($continue) eq 'Y'; |
| 61 |
} |
62 |
} |
| 62 |
|
63 |
|
|
|
64 |
if ( !$confirm ) { |
| 65 |
print $statistics->count() . " statistics would have been pseudonymized\n" if $verbose; |
| 66 |
exit 1; |
| 67 |
} |
| 63 |
|
68 |
|
| 64 |
while ( my $statistic = $statistics->next ) { |
69 |
while ( my $statistic = $statistics->next ) { |
| 65 |
$statistic->pseudonymize(); |
70 |
$statistic->pseudonymize(); |
|
Lines 94-99
Verbose mode.
Link Here
|
| 94 |
|
99 |
|
| 95 |
This option allows for specifying a date to pseudonmyize before. Useful if you have enabled pseudonymization and want to pseudonymize transactions before that date. If not passed all statistics before current time will be pseudonymized. |
100 |
This option allows for specifying a date to pseudonmyize before. Useful if you have enabled pseudonymization and want to pseudonymize transactions before that date. If not passed all statistics before current time will be pseudonymized. |
| 96 |
|
101 |
|
|
|
102 |
=item B<-c|--confirm> |
| 103 |
|
| 104 |
Without this parameter script will be run in test mode, no changes will be made |
| 105 |
|
| 97 |
=back |
106 |
=back |
| 98 |
|
107 |
|
| 99 |
=head1 AUTHOR |
108 |
=head1 AUTHOR |
| 100 |
- |
|
|