Bugzilla – Attachment 6831 Details for
Bug 6755
Problems with switching languages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-6755-Problems-when-switching-languages.patch (text/plain), 1.30 KB, created by
Frédéric Demians
on 2011-12-16 08:59:40 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2011-12-16 08:59:40 UTC
Size:
1.30 KB
patch
obsolete
>From df1f66e99ed273d6df68bfff48df89924a3228b8 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Fri, 16 Dec 2011 09:57:00 +0100 >Subject: [PATCH] Bug 6755 Problems when switching languages > >As a side effect of patches for bug 6629, this bug has been reintroduced in >HEAD and 3.6.x. > >To reproduce it: > >- Define two languages for OPAC: en and fr-FR >- Open Firefox (for example) >- Menu Edit > Preferences, tab Option: select Language fr, en >- Clear your cookies >- Open the OPAC >- The OPAC is displayed in English. This is wrong. The fr templates > should have been used based on browser languages preferences. >--- > C4/Templates.pm | 10 ++-------- > 1 files changed, 2 insertions(+), 8 deletions(-) > >diff --git a/C4/Templates.pm b/C4/Templates.pm >index 73d94c2..f671cbb 100644 >--- a/C4/Templates.pm >+++ b/C4/Templates.pm >@@ -319,14 +319,8 @@ sub setlanguagecookie { > > sub getlanguagecookie { > my ($query) = @_; >- my $lang; >- if ($query->cookie('KohaOpacLanguage')){ >- $lang = $query->cookie('KohaOpacLanguage') ; >- }else{ >- $lang = $ENV{HTTP_ACCEPT_LANGUAGE}; >- >- } >- $lang =~ s/[^a-zA-Z_-]*//; #sanitzie >+ my $lang = $query->cookie('KohaOpacLanguage') || ''; >+ $lang =~ s/[^a-zA-Z_-]*//; #sanitize > return $lang; > } > >-- >1.7.8 >
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 6755
:
5146
|
5382
|
5385
|
5407
|
5534
|
5538
|
5539
|
5565
|
5597
|
5807
|
5808
|
5809
|
6831