Bugzilla – Attachment 115412 Details for
Bug 24272
Add a command line script to compare the syspref cache to the database
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24272: Use Pod2Usage and surround values with ''
Bug-24272-Use-Pod2Usage-and-surround-values-with-.patch (text/plain), 1.63 KB, created by
Jonathan Druart
on 2021-01-20 09:03:13 UTC
(
hide
)
Description:
Bug 24272: Use Pod2Usage and surround values with ''
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-01-20 09:03:13 UTC
Size:
1.63 KB
patch
obsolete
>From a79e043b3a1f5cfdf2335b85337eed48977f1999 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 20 Jan 2021 10:02:10 +0100 >Subject: [PATCH] Bug 24272: Use Pod2Usage and surround values with '' > >--- > misc/maintenance/check_syspref_cache.pl | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/misc/maintenance/check_syspref_cache.pl b/misc/maintenance/check_syspref_cache.pl >index ac60081389..3de4b27f78 100755 >--- a/misc/maintenance/check_syspref_cache.pl >+++ b/misc/maintenance/check_syspref_cache.pl >@@ -16,6 +16,8 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >+use Getopt::Long; >+use Pod::Usage; > > use Koha::Script; > use Koha::Caches; >@@ -36,6 +38,14 @@ Catch data inconsistencies in cached sysprefs vs those in the database > > =cut > >+my ( $help, $man ); >+GetOptions( >+ 'help|?' => \$help, >+ 'man' => \$man, >+); >+ >+pod2usage(1) if $help; >+pod2usage( -verbose => 2 ) if $man; > > my $syspref_cache = Koha::Caches->get_instance('syspref'); > my $prefs = Koha::Config::SysPrefs->search(); >@@ -44,5 +54,6 @@ while (my $pref = $prefs->next) { > my $var = lc $pref->variable; > my $cached_var = $syspref_cache->get_from_cache("syspref_$var"); > next unless defined $cached_var; #If not defined in cache we will fetch from DB so this case is OK >- print "$var: value in cache is $cached_var and value in db is ".$pref->value,"\n" unless $cached_var eq $pref->value; >+ say sprintf( "%s: value in cache is '%s' and value in db is '%s'", $var, $cached_var, $pref->value ) >+ unless $cached_var eq $pref->value; > } >-- >2.20.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 24272
:
96467
|
113135
|
113193
|
115029
|
115192
| 115412 |
115413