Bugzilla – Attachment 69675 Details for
Bug 19788
Case sensitivity is not preserved when creating local system preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19788 Local preference with uppercase
Bug-19788-Local-preference-with-uppercase.patch (text/plain), 1.40 KB, created by
Frédéric Demians
on 2017-12-11 07:32:41 UTC
(
hide
)
Description:
Bug 19788 Local preference with uppercase
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2017-12-11 07:32:41 UTC
Size:
1.40 KB
patch
obsolete
>From c3f09c21d99df79f76a1f01baf018baaedf50dc4 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Mon, 11 Dec 2017 08:41:05 +0100 >Subject: [PATCH] Bug 19788 Local preference with uppercase > >Fix a bug tranforming new local preference variable name in lowercase. > >TO TEST: > >1. Admin > System preferences > Local use >2. Button New preference. Fill variable field with 'TESTfoo'. Click > Save. >3. The new variable is named: 'testfoo'. >4. Apply the patch. >5. Button New preference. Fill variable field with 'TESTfoo2'. Click > Save. >6. The new variable is properly named: 'TESTfoo2'. >--- > C4/Context.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 1aa08be..1eb5f88 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -496,6 +496,7 @@ preference. > sub set_preference { > my ( $self, $variable, $value, $explanation, $type, $options ) = @_; > >+ my $variable_case = $variable; > $variable = lc $variable; > > my $syspref = Koha::Config::SysPrefs->find($variable); >@@ -521,7 +522,7 @@ sub set_preference { > )->store; > } else { > $syspref = Koha::Config::SysPref->new( >- { variable => $variable, >+ { variable => $variable_case, > value => $value, > explanation => $explanation || undef, > type => $type, >-- >1.7.10.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 19788
:
69675
|
69676
|
69912
|
70041
|
70042