Bugzilla – Attachment 46741 Details for
Bug 15188
remove_unused_authorities.pl will delete all authorities if zebra is not running
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15188 - Fixes remove_unused_authorities.pl will delete all authorities if zebra is not running
Bug-15188---Fixes-removeunusedauthoritiespl-will-d.patch (text/plain), 1.37 KB, created by
Chris Cormack
on 2016-01-16 02:21:04 UTC
(
hide
)
Description:
Bug 15188 - Fixes remove_unused_authorities.pl will delete all authorities if zebra is not running
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2016-01-16 02:21:04 UTC
Size:
1.37 KB
patch
obsolete
>From fdcd76ecca98e67110a8292dadb0583aa828b6f6 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Tue, 29 Dec 2015 16:46:38 +0100 >Subject: [PATCH] Bug 15188 - Fixes remove_unused_authorities.pl will delete > all authorities if zebra is not running > >Test plan: > >1) Shut down zebra: koha-zebra-ctl.sh stop >2) Execute the script: remove_unused_authorities.pl (with -t if you don't want to really delete from your database). >3) Check that the script would have deleted all the authorities (eg: 31449 authorities parsed, 31449 deleted and 0 unchanged because used). >4) Apply patch >5) Run, notice that the script dies because zebra is unavailable > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > misc/migration_tools/remove_unused_authorities.pl | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/misc/migration_tools/remove_unused_authorities.pl b/misc/migration_tools/remove_unused_authorities.pl >index 2509318..af8897a 100755 >--- a/misc/migration_tools/remove_unused_authorities.pl >+++ b/misc/migration_tools/remove_unused_authorities.pl >@@ -45,6 +45,10 @@ if ($test) { > print "testing only, authorities will not be deleted.\n"; > } > >+if (C4::Context->Zconn("biblioserver",0)->errcode() == 10000) { >+ die "Zebra server seems not to be available. This script needs Zebra runs." >+} >+ > my $dbh=C4::Context->dbh; > my $thresholdmin=0; > my $thresholdmax=0; >-- >2.7.0.rc3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15188
:
45257
|
46018
|
46741
|
46849
|
46850