sub usage {
print STDERR <<USAGE;
-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]
+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]
-h --help prints this help message, and exits, ignoring all
other options
--del-unv-selfreg DAYS Delete unverified self registrations older than DAYS
--unique-holidays DAYS Delete all unique holidays older than DAYS
--temp-uploads Delete temporary uploads.
- --temp-uploads-override DAYS Override the corresponding preference value.
+ --temp-uploads-days DAYS Override the corresponding preference value.
USAGE
exit $_[0];
}
my $fees_days;
my $special_holidays_days;
my $temp_uploads;
-my $override_temp_uploads;
+my $temp_uploads_days;
GetOptions(
'h|help' => \$help,
'del-unv-selfreg' => \$pUnvSelfReg,
'unique-holidays:i' => \$special_holidays_days,
'temp-uploads' => \$temp_uploads,
- 'temp-uploads-override:i' => \$override_temp_uploads,
+ 'temp-uploads-days:i' => \$temp_uploads_days,
) || usage(1);
# Use default values
# If the pref is empty, nothing happens (unless you override).
print "Purging temporary uploads.\n" if $verbose;
Koha::UploadedFiles->delete_temporary({
- override_pref => $override_temp_uploads,
+ override_pref => $temp_uploads_days,
});
print "Done purging temporary uploads.\n" if $verbose;
}