Bugzilla – Attachment 38838 Details for
Bug 14145
Noisy warns in admin/preferences.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14145: Noisy warns in admin/preferences.pl
Bug-14145-Noisy-warns-in-adminpreferencespl.patch (text/plain), 2.46 KB, created by
Aleisha Amohia
on 2015-05-05 05:13:02 UTC
(
hide
)
Description:
Bug 14145: Noisy warns in admin/preferences.pl
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2015-05-05 05:13:02 UTC
Size:
2.46 KB
patch
obsolete
>From b770676a6f8514d7e471974bb748a99e438e8fdd Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >Date: Tue, 5 May 2015 02:55:19 +0000 >Subject: [PATCH] Bug 14145: Noisy warns in admin/preferences.pl > >This patch silences the warns on lines 116 and 121 by referring to the chunk variable name (type) rather than what I assume is the string 'multiple'. I don't know that this is the best solution for this, but the warns are gone and the page seems to work still. > >To test: > >1) Go to Admin -> System Preferences and click on the OPAC tab >2) Notice the warns in the error log >3) Apply the patch and refresh page >4) Notice page still works but no warns in error log >--- > admin/preferences.pl | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 1bd961e..96013b2 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -46,7 +46,7 @@ sub GetTab { > my $tab_template = C4::Templates::gettemplate( 'admin/preferences/' . $tab . '.pref', 'intranet', $input ); > > my $active_currency = GetCurrency(); >- my $local_currency; >+ my $local_currency;; > if ($active_currency) { > $local_currency = $active_currency->{currency}; > } >@@ -61,7 +61,7 @@ sub _get_chunk { > my ( $value, %options ) = @_; > > my $name = $options{'pref'}; >- my $chunk = { name => $name, value => $value, type => $options{'type'} || 'input', class => $options{'class'} }; >+ my $chunk = { name => $name, value => $value, type => $options{'type'} || 'input', class => $options{'class'} };; > > if ( $options{'class'} && $options{'class'} eq 'password' ) { > $chunk->{'input_type'} = 'password'; >@@ -108,18 +108,18 @@ sub _get_chunk { > } elsif ( $options{'multiple'} ) { > my @values = split /,/, $value; > $chunk->{type} = 'multiple'; >- $chunk->{CHOICES} = [ >+ $chunk->{CHOICES} = { > sort { $a->{'text'} cmp $b->{'text'} } > map { > my $option_value = $_; > { >- text => $options{multiple}->{$option_value}, >+ text => $options{type}->{$option_value}, > value => $option_value, > selected => grep /^$option_value$/, @values, > } > } >- keys %{ $options{multiple} } >- ]; >+ keys %{ $options{type} } >+ }; > } > > $chunk->{ 'type_' . $chunk->{'type'} } = 1; >-- >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 14145
:
38838
|
38839
|
38999
|
39051
|
39384