Bug 15188: Do not remove unused auths if zebra is not reachable
Other conn errors should be checked (wrong user/pwd, etc.) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
parent
128e7f54b1
commit
a60943bc1b
1 changed files with 4 additions and 1 deletions
|
@ -45,8 +45,11 @@ if ($test) {
|
|||
print "testing only, authorities will not be deleted.\n";
|
||||
}
|
||||
|
||||
if (C4::Context->Zconn("biblioserver",0)->errcode() == 10000) {
|
||||
my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
|
||||
if ( $errZebraConnection == 10000 ) {
|
||||
die "Zebra server seems not to be available. This script needs Zebra runs."
|
||||
} elsif ( $errZebraConnection ) {
|
||||
die "Error from Zebra: $errZebraConnection";
|
||||
}
|
||||
|
||||
my $dbh=C4::Context->dbh;
|
||||
|
|
Loading…
Reference in a new issue