[Patches] [PATCH] Bug 7282: invalid language selection

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Fri Dec 2 05:05:02 NZDT 2011


From: =?UTF-8?q?Fr=C3=A8re=20S=C3=A9bastien=20Marie?= <semarie-koha at latrappe.fr>
Date: Thu, 1 Dec 2011 16:58:37 +0100
Subject: [PATCH] Bug 7282: invalid language selection

- restore the original behavior: call getlanguagecookie only if the cookie is present
---
 C4/Templates.pm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/C4/Templates.pm b/C4/Templates.pm
index 73d94c2..0aaa1ff 100644
--- a/C4/Templates.pm
+++ b/C4/Templates.pm
@@ -277,7 +277,8 @@ sub themelanguage {
     my @languages = split(",", C4::Context->preference(
         $is_intranet ? 'language' : 'opaclanguages'));
     my $lang;
-    $lang = getlanguagecookie($query);
+    $lang = getlanguagecookie($query)
+	if $query->cookie('KohaOpacLanguage');
     unless ($lang) {
         my $http_accept_language = $ENV{ HTTP_ACCEPT_LANGUAGE };
         $lang = accept_language( $http_accept_language, 
-- 
1.7.2.5




More information about the Patches mailing list