Lines 44-50
use Koha::UploadedFiles;
Link Here
|
44 |
|
44 |
|
45 |
sub usage { |
45 |
sub usage { |
46 |
print STDERR <<USAGE; |
46 |
print STDERR <<USAGE; |
47 |
Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueue DAYS] [-m|--mail] [--merged] [--import DAYS] [--logs DAYS] [--searchhistory DAYS] [--restrictions DAYS] [--all-restrictions] [--fees DAYS] [--temp-uploads] [--temp-uploads-override DAYS] |
47 |
Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueue DAYS] [-m|--mail] [--merged] [--import DAYS] [--logs DAYS] [--searchhistory DAYS] [--restrictions DAYS] [--all-restrictions] [--fees DAYS] [--temp-uploads] [--temp-uploads-days DAYS] |
48 |
|
48 |
|
49 |
-h --help prints this help message, and exits, ignoring all |
49 |
-h --help prints this help message, and exits, ignoring all |
50 |
other options |
50 |
other options |
Lines 82-88
Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueu
Link Here
|
82 |
--del-unv-selfreg DAYS Delete unverified self registrations older than DAYS |
82 |
--del-unv-selfreg DAYS Delete unverified self registrations older than DAYS |
83 |
--unique-holidays DAYS Delete all unique holidays older than DAYS |
83 |
--unique-holidays DAYS Delete all unique holidays older than DAYS |
84 |
--temp-uploads Delete temporary uploads. |
84 |
--temp-uploads Delete temporary uploads. |
85 |
--temp-uploads-override DAYS Override the corresponding preference value. |
85 |
--temp-uploads-days DAYS Override the corresponding preference value. |
86 |
USAGE |
86 |
USAGE |
87 |
exit $_[0]; |
87 |
exit $_[0]; |
88 |
} |
88 |
} |
Lines 106-112
my $pUnvSelfReg;
Link Here
|
106 |
my $fees_days; |
106 |
my $fees_days; |
107 |
my $special_holidays_days; |
107 |
my $special_holidays_days; |
108 |
my $temp_uploads; |
108 |
my $temp_uploads; |
109 |
my $override_temp_uploads; |
109 |
my $temp_uploads_days; |
110 |
|
110 |
|
111 |
GetOptions( |
111 |
GetOptions( |
112 |
'h|help' => \$help, |
112 |
'h|help' => \$help, |
Lines 128-134
GetOptions(
Link Here
|
128 |
'del-unv-selfreg' => \$pUnvSelfReg, |
128 |
'del-unv-selfreg' => \$pUnvSelfReg, |
129 |
'unique-holidays:i' => \$special_holidays_days, |
129 |
'unique-holidays:i' => \$special_holidays_days, |
130 |
'temp-uploads' => \$temp_uploads, |
130 |
'temp-uploads' => \$temp_uploads, |
131 |
'temp-uploads-override:i' => \$override_temp_uploads, |
131 |
'temp-uploads-days:i' => \$temp_uploads_days, |
132 |
) || usage(1); |
132 |
) || usage(1); |
133 |
|
133 |
|
134 |
# Use default values |
134 |
# Use default values |
Lines 315-321
if( $temp_uploads ) {
Link Here
|
315 |
# If the pref is empty, nothing happens (unless you override). |
315 |
# If the pref is empty, nothing happens (unless you override). |
316 |
print "Purging temporary uploads.\n" if $verbose; |
316 |
print "Purging temporary uploads.\n" if $verbose; |
317 |
Koha::UploadedFiles->delete_temporary({ |
317 |
Koha::UploadedFiles->delete_temporary({ |
318 |
override_pref => $override_temp_uploads, |
318 |
override_pref => $temp_uploads_days, |
319 |
}); |
319 |
}); |
320 |
print "Done purging temporary uploads.\n" if $verbose; |
320 |
print "Done purging temporary uploads.\n" if $verbose; |
321 |
} |
321 |
} |
322 |
- |
|
|