Bugzilla – Attachment 5146 Details for
Bug 6755
Problems with switching languages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.txt (text/plain), 1.82 KB, created by
Marcel de Rooy
on 2011-08-25 13:10:41 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2011-08-25 13:10:41 UTC
Size:
1.82 KB
patch
obsolete
>From 7d2eb645ab846f09a48d4428171a6e845f26611e Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 25 Aug 2011 15:01:19 +0200 >Subject: [PATCH] 6755 Problems with switching languages >Content-Type: text/plain; charset="utf-8" > >This patch solves the situation that news is in another language than the Koha interface. >It just uses the same code now, removing unneeded lines. >--- > opac/opac-main.pl | 28 +--------------------------- > 1 files changed, 1 insertions(+), 27 deletions(-) > >diff --git a/opac/opac-main.pl b/opac/opac-main.pl >index 177d812..e2f069f 100755 >--- a/opac/opac-main.pl >+++ b/opac/opac-main.pl >@@ -54,33 +54,7 @@ $template->param( > > # display news > # use cookie setting for language, bug default to syspref if it's not set >-(my $theme) = themelanguage(C4::Context->config('opachtdocs'),'opac-main.tmpl','opac',$input); >- >-my $translations = getTranslatedLanguages('opac',$theme); >-my @languages = (); >-foreach my $trans (@$translations) >-{ >- push(@languages, $trans->{rfc4646_subtag}); >-} >- >-my $news_lang; >-if($input->cookie('KohaOpacLanguage')){ >- $news_lang = $input->cookie('KohaOpacLanguage'); >-}else{ >- if ($ENV{HTTP_ACCEPT_LANGUAGE}) { >- while( !$news_lang && ( $ENV{HTTP_ACCEPT_LANGUAGE} =~ m/([a-zA-Z]{2,}-?[a-zA-Z]*)(;|,)?/g ) ){ >- if( my @lang = grep { /^$1$/i } @languages ) { >- $news_lang = $lang[0]; >- } >- } >- } >- if (not $news_lang) { >- my @languages = split ",", C4::Context->preference("opaclanguages"); >- $news_lang = $languages[0]; >- } >-} >- >-$news_lang = $news_lang ? $news_lang : 'en' ; >+my ($theme, $news_lang) = themelanguage(C4::Context->config('opachtdocs'),'opac-main.tt','opac',$input); > > my $all_koha_news = &GetNewsToDisplay($news_lang); > my $koha_news_count = scalar @$all_koha_news; >-- >1.6.0.6 >
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