Bug 23260: Update cron to exit if AnonymousPatron is not set

Signed-off-by: Peter Moore <peter@mrcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2025-09-25 19:33:34 +00:00
parent 9165c0fa4b
commit fde40177fa
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 8 additions and 8 deletions

View File

@ -56,17 +56,17 @@ if ($help) {
usage(0);
}
my $pref1 = C4::Context->preference("AnonymizeLastBorrower");
my $pref2 = C4::Context->preference("AnonymousPatron");
my $AnonymizeLastBorrower = C4::Context->preference("AnonymizeLastBorrower");
my $AnonymousPatron = C4::Context->preference("AnonymousPatron");
if ( !$pref1 ) {
print "Preference 'AnonymizeLastBorrower' must be enabled to anonymize item's last borrower\n\n";
usage(1);
unless ($AnonymizeLastBorrower) {
print STDERR "Preference 'AnonymizeLastBorrower' must be enabled to anonymize item's last borrower\n\n";
exit(1);
}
if ( !$pref2 ) {
print "Preference 'AnonymousPatron' must be enabled to anonymize item's last borrower\n\n";
usage(1);
unless ($AnonymousPatron) {
print STDERR "Preference 'AnonymousPatron' must be enabled to anonymize item's last borrower\n\n";
exit(1);
}
unless ($confirm) {