|
Lines 74-80
Print a brief help message and exits.
Link Here
|
| 74 |
|
74 |
|
| 75 |
Prints the manual page and exits. |
75 |
Prints the manual page and exits. |
| 76 |
|
76 |
|
| 77 |
=item B<--verbosse | -v> |
77 |
=item B<--verbose | -v> |
| 78 |
|
78 |
|
| 79 |
Verbose. Without this flag set, only fatal errors are reported. |
79 |
Verbose. Without this flag set, only fatal errors are reported. |
| 80 |
|
80 |
|
|
Lines 248-264
my $target_patrons = Koha::Patrons->search(\%params)->search_patrons_to_update_c
Link Here
|
| 248 |
fine_max => $fine_max, |
248 |
fine_max => $fine_max, |
| 249 |
} |
249 |
} |
| 250 |
); |
250 |
); |
|
|
251 |
|
| 251 |
my $patrons_found = $target_patrons->count; |
252 |
my $patrons_found = $target_patrons->count; |
| 252 |
my $actually_updated = 0; |
253 |
my $actually_updated = 0; |
| 253 |
my $testdisplay = $doit ? "" : "WOULD HAVE "; |
254 |
my $testdisplay = $doit ? "" : "WOULD HAVE "; |
| 254 |
if ($verbose) { |
255 |
if ($verbose) { |
| 255 |
while ( my $target_patron = $target_patrons->next() ) { |
256 |
while ( my $target_patron = $target_patrons->next() ) { |
| 256 |
my $target = Koha::Patrons->find( $target_patron->borrowernumber ); |
257 |
$target_patron->discard_changes(); |
| 257 |
$verbose |
258 |
$verbose |
| 258 |
and print $testdisplay |
259 |
and print $testdisplay |
| 259 |
. "Updated " |
260 |
. "Updated " |
| 260 |
. $target->firstname . " " |
261 |
. $target_patron->firstname() . " " |
| 261 |
. $target->surname |
262 |
. $target_patron->surname() |
| 262 |
. " from $fromcat to $tocat\n"; |
263 |
. " from $fromcat to $tocat\n"; |
| 263 |
} |
264 |
} |
| 264 |
$target_patrons->reset; |
265 |
$target_patrons->reset; |
| 265 |
- |
|
|