Bugzilla – Attachment 70400 Details for
Bug 18071
Add new script update_authorities.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18071: (QA follow-up) Rename commit to confirm parameter
Bug-18071-QA-follow-up-Rename-commit-to-confirm-pa.patch (text/plain), 3.27 KB, created by
Marcel de Rooy
on 2018-01-10 12:33:55 UTC
(
hide
)
Description:
Bug 18071: (QA follow-up) Rename commit to confirm parameter
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-01-10 12:33:55 UTC
Size:
3.27 KB
patch
obsolete
>From b17e26856a53eaa4afc6d8c3f3c9602788e7280e Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 10 Jan 2018 13:31:49 +0100 >Subject: [PATCH] Bug 18071: (QA follow-up) Rename commit to confirm parameter >Content-Type: text/plain; charset=utf-8 > >Trivial edit. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/maintenance/update_authorities.pl | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/misc/maintenance/update_authorities.pl b/misc/maintenance/update_authorities.pl >index b98cafc..a96295f 100755 >--- a/misc/maintenance/update_authorities.pl >+++ b/misc/maintenance/update_authorities.pl >@@ -25,10 +25,10 @@ use Pod::Usage; > > use C4::AuthoritiesMarc qw/AddAuthority DelAuthority GetAuthority merge/; > >-my ( @authid, $commit, $delete, $help, $merge, $reference, $renumber, $verbose ); >+my ( @authid, $confirm, $delete, $help, $merge, $reference, $renumber, $verbose ); > GetOptions( > 'authid:s' => \@authid, >- 'commit' => \$commit, >+ 'confirm' => \$confirm, > 'delete' => \$delete, > 'help' => \$help, > 'merge' => \$merge, >@@ -38,7 +38,7 @@ GetOptions( > ); > > @authid = map { split /[,]/, $_; } @authid; >-print "No changes will be made\n" unless $commit; >+print "No changes will be made\n" unless $confirm; > pod2usage(1) if $help; > > if ( $delete and $merge and $renumber ) { >@@ -59,7 +59,7 @@ if( $delete ) { > sub delete_auth { > my ( $auths ) = @_; > foreach my $authid ( uniq(@$auths) ) { >- if( $commit ) { >+ if( $confirm ) { > DelAuthority({ authid => $authid }); # triggers a merge (read: cleanup) > print "Removing $authid\n" if $verbose; > } else { >@@ -75,7 +75,7 @@ sub merge_auth { > > my $marc_ref = GetAuthority( $reference ) || die "Reference record $reference not found\n"; > # First update all linked biblios of reference >- merge({ mergefrom => $reference, MARCfrom => $marc_ref, mergeto => $reference, MARCto => $marc_ref, override_limit => 1 }) if $commit; >+ merge({ mergefrom => $reference, MARCfrom => $marc_ref, mergeto => $reference, MARCto => $marc_ref, override_limit => 1 }) if $confirm; > > # Merge all authid's into reference > my $marc; >@@ -86,7 +86,7 @@ sub merge_auth { > print "Authority id $authid ignored, does not exist.\n"; > next; > } >- if( $commit ) { >+ if( $confirm ) { > merge({ > mergefrom => $authid, > MARCfrom => $marc, >@@ -107,7 +107,7 @@ sub renumber { > foreach my $authid ( uniq(@$auths) ) { > if( my $authority = Koha::Authorities->find($authid) ) { > my $marc = GetAuthority( $authid ); >- if( $commit ) { >+ if( $confirm ) { > AddAuthority( $marc, $authid, $authority->authtypecode ); > # AddAuthority contains an update of 001, 005 etc. > print "Renumbered $authid\n" if $verbose; >@@ -150,7 +150,7 @@ update_authorities.pl -c -authid 1,2,3 -renumber > authid: List authority numbers separated by commas or repeat the > parameter. > >-commit: Needed to commit changes. >+confirm: Needed to commit changes. > > delete: Delete the listed authority numbers and remove its references from > linked biblio records. >-- >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 18071
:
60250
|
64743
|
64744
|
66854
|
69428
|
70310
|
70311
|
70312
|
70320
|
70388
| 70400