Bugzilla – Attachment 29555 Details for
Bug 12534
PROG/CCSR deprecation: Make getlanguages() theme independent for opac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12534 - PROG/CCSR deprecation: Make getlanguages() theme independent for opac
Bug-12534---PROGCCSR-deprecation-Make-getlanguages.patch (text/plain), 1.88 KB, created by
Bernardo Gonzalez Kriegel
on 2014-07-07 17:24:46 UTC
(
hide
)
Description:
Bug 12534 - PROG/CCSR deprecation: Make getlanguages() theme independent for opac
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2014-07-07 17:24:46 UTC
Size:
1.88 KB
patch
obsolete
>From 303f8bb6b348f8d90ab94c60b05d1389a1c095d9 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Sun, 6 Jul 2014 20:21:43 -0300 >Subject: [PATCH] Bug 12534 - PROG/CCSR deprecation: Make getlanguages() theme > independent for opac > >This patch removes a reference to prog theme on getlanguages() >when ENV var HTTP_ACCEPT_LANGUAGE is checked. > >Changed to use sysprefs to find theme for opac and intranet > >To test: >1) Apply the patch >2) Translate for a couple of languages: de-DE, fr-FR, es-ES, etc >3) Enable those languages for OPAC on I18N prefs >4) Using Firefox, clean all history/cookies >5) Change variable intl.accept_languages (will do several times) > a) got to about:config > b) search 'lang' > c) look for the variable, double click, change to 'de-DE' >6) Go to opac page, must load in german >7) Repeat for each translated lang: clean > change val > reload opac > On each case opac must load on configured language >8) Just to test, set variable on untranslated lang, opac page >must load on first value of list of enabled languages >9) prove t/Languages.t >--- > C4/Languages.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Languages.pm b/C4/Languages.pm >index 78d54a9..57bef47 100644 >--- a/C4/Languages.pm >+++ b/C4/Languages.pm >@@ -571,6 +571,7 @@ sub getlanguage { > > $cgi //= new CGI; > my $interface = C4::Context->interface; >+ my $theme = C4::Context->preference( ( $interface eq 'opac' ) ? 'opacthemes' : 'template' ); > my $language; > > my $preference_to_check = >@@ -592,7 +593,7 @@ sub getlanguage { > # HTTP_ACCEPT_LANGUAGE > if ( !$language && $ENV{HTTP_ACCEPT_LANGUAGE} ) { > $language = accept_language( $ENV{HTTP_ACCEPT_LANGUAGE}, >- getTranslatedLanguages( $interface, 'prog' ) ); >+ getTranslatedLanguages( $interface, $theme ) ); > } > > # Ignore a lang not selected in sysprefs >-- >1.7.9.5
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 12534
:
29533
|
29555
|
29608
|
29641