Bugzilla – Attachment 58833 Details for
Bug 4126
bulkmarcimport.pl allows -b and -a to be specified simultaneously
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 4126 - Exit bulkmarcimport if -a and -b given
SIGNED-OFF-Bug-4126---Exit-bulkmarcimport-if--a-an.patch (text/plain), 1.52 KB, created by
Mark Tompsett
on 2017-01-11 16:24:29 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 4126 - Exit bulkmarcimport if -a and -b given
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-01-11 16:24:29 UTC
Size:
1.52 KB
patch
obsolete
>From 85e1d6ffa1b2663c31b3d8ed238e31d8cf72a902 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Thu, 10 Nov 2016 14:32:44 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 4126 - Exit bulkmarcimport if -a and -b > given > >Currently it is possible to spceify both --biblios and --authorities >as command line switches to bulkmarcimport.pl. This does not make sense >so we should exit early and explain that these switches are mutually >exclusive. > >To test: >- Run one of these and check that there is no complaint about missing > options: > perl misc/migration_tools/bulkmarcimport.pl -a -b > sudo koha-shell -c "perl misc/migration_tools/bulkmarcimport.pl -a -b" > kohadev >- Observe that this displays the perldoc, but does not complain about > mutually exclusive switches. >- Apply the patch >- Rerun the command(s) from earlier. >- Verify that the script is now halted and a small explanation given. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > misc/migration_tools/bulkmarcimport.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl >index d007d29..34d2b52 100755 >--- a/misc/migration_tools/bulkmarcimport.pl >+++ b/misc/migration_tools/bulkmarcimport.pl >@@ -84,6 +84,8 @@ $biblios ||= !$authorities; > $insert ||= !$update; > my $writemode = ($append) ? "a" : "w"; > >+pod2usage( -msg => "\nYou must specify either --biblios or --authorities, not both.\n", -exitval ) if $biblios && $authorities; >+ > if ($all) { > $insert = 1; > $update = 1; >-- >2.1.4
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 4126
:
57428
|
58833
|
59618