Bugzilla – Attachment 165839 Details for
Bug 36709
Add --confirm flag to update_localuse_from_statistics.pl script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36709: Add confirm flag to update_localuse_from_statistics.pl script
Bug-36709-Add-confirm-flag-to-updatelocalusefromst.patch (text/plain), 1.90 KB, created by
Matt Blenkinsop
on 2024-04-30 10:45:54 UTC
(
hide
)
Description:
Bug 36709: Add confirm flag to update_localuse_from_statistics.pl script
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-04-30 10:45:54 UTC
Size:
1.90 KB
patch
obsolete
>From 0ac5d5388aeec2023f533da67db35cc74201ad3c Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 29 Apr 2024 20:39:08 +0000 >Subject: [PATCH] Bug 36709: Add confirm flag to > update_localuse_from_statistics.pl script > >To test: >1. APPLY PATCH and restart all >2. Run the update_localuse_from_statistics.pl script without a confirm flag, nothing happens. >3. Run the script and add the --confirm flag, stuff happens. > >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >--- > .../update_localuse_from_statistics.pl | 23 +++++++++++++++---- > 1 file changed, 18 insertions(+), 5 deletions(-) > >diff --git a/misc/maintenance/update_localuse_from_statistics.pl b/misc/maintenance/update_localuse_from_statistics.pl >index ac8ef0d92a..7d64c645d1 100755 >--- a/misc/maintenance/update_localuse_from_statistics.pl >+++ b/misc/maintenance/update_localuse_from_statistics.pl >@@ -27,7 +27,11 @@ use Koha::Statistics; > use Getopt::Long qw( GetOptions ); > use Pod::Usage qw( pod2usage ); > >-sub usage { >+my ($params); >+GetOptions( >+ 'confirm' => \$params->{confirm}, 'help' => \$params->{help}, 'age:i' => \$params->{age}, >+); >+if ( $params->{help} ) { > pod2usage( -verbose => 2 ); > exit; > } >@@ -57,7 +61,9 @@ my $result = GetOptions( > > usage() if $help; > >-update_localuse(); >+if ( $params->{confirm} ) { >+ update_localuse(); >+} > > =head1 NAME > >@@ -67,16 +73,23 @@ update_local_use_from_statistics.pl > > update_localuse_from_statistics.pl > update_localuse_from_statistics.pl --help >+ update_localuse_from_statistics.pl --confirm > > =head1 DESCRIPTION > > This script updates the items.localuse column with data from the statistics table to make sure the two tables are congruent. > >-=over 8 >+=head1 OPTIONS >+ >+=over >+ >+=item B<-h--help> >+ >+Prints this help message > >-=item B<--help> >+=item B<-c|--confirm> > >-Prints this help >+ Confirm to run the script. > > =back > >-- >2.37.1 (Apple Git-137.1)
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 36709
:
165807
|
165839
|
166244