Bugzilla – Attachment 77636 Details for
Bug 20504
Language attribute in html tag is empty in system preference editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20504: Fix lang attribute in html tag on systempreferences page
Bug-20504-Fix-lang-attribute-in-html-tag-on-system.patch (text/plain), 2.10 KB, created by
Jonathan Druart
on 2018-08-09 21:57:14 UTC
(
hide
)
Description:
Bug 20504: Fix lang attribute in html tag on systempreferences page
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-08-09 21:57:14 UTC
Size:
2.10 KB
patch
obsolete
>From 24dd80d3919a8a2085fc279b0a0edb8a7a243db9 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Thu, 9 Aug 2018 17:46:09 +0000 >Subject: [PATCH] Bug 20504: Fix lang attribute in html tag on > systempreferences page > >On the system preferences page the lang attribute of the >html tag is always empty. > >To test: >- Go to systempreferences >- Check the html source and look at the html tag, > it should read: <html lang=""> >- Apply patch >- Check the html source again: <html lang="en"> > Verify the language code shown matches the currently > selected language in the staff interface >- Verify the language system preferences work correctly > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >The problem was actually that > $lang = $template->param( 'lang' ); >should certainly be $lang = $input->param( 'lang' ); >and, as it, it overrides the value of 'lang' passed from C4::Auth >--- > admin/preferences.pl | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 988753aed0..03d0934907 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -35,7 +35,6 @@ use YAML::Syck qw(); > use List::MoreUtils qw(any); > $YAML::Syck::ImplicitTyping = 1; > $YAML::Syck::ImplicitUnicode = 1; >-our $lang; > > # use Smart::Comments; > # >@@ -81,7 +80,7 @@ sub _get_chunk { > $interface = 'intranet'; > $theme = C4::Context->preference('template'); > } >- $chunk->{'languages'} = getTranslatedLanguages( $interface, $theme, $lang, $current_languages ); >+ $chunk->{'languages'} = getTranslatedLanguages( $interface, $theme, undef, $current_languages ); > $chunk->{'type'} = 'languages'; > } elsif ( $options{ 'choices' } ) { > if ( $options{'choices'} && ref( $options{ 'choices' } ) eq '' ) { >@@ -306,7 +305,6 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-$lang = $template->param( 'lang' ); > my $op = $input->param( 'op' ) || ''; > my $tab = $input->param( 'tab' ); > $tab ||= 'acquisitions'; # Ideally this should be "local-use" but preferences.pl >-- >2.11.0
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 20504
:
77634
|
77636
|
78049