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:
parent
9165c0fa4b
commit
fde40177fa
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue