From 79d79e8d0c32d6101c785ce3f5c724f4cebc237c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr>
Date: Thu, 9 Feb 2012 11:03:34 +0100
Subject: [PATCH] [SIGNED-OFF] Bug 7514 Choose OPAC language with URL
 parameter

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>

Tested:
- with and without cookie set
- different language codes

http://.../cgi-bin/koha/opac-changelanguage.pl?language=de-DE
will directly open the German OPAC.

http://.../cgi-bin/koha/opac-changelanguage.pl?language=en
will directly open the English OPAC.
---
 opac/opac-changelanguage.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opac/opac-changelanguage.pl b/opac/opac-changelanguage.pl
index 1c3ee8e..8692a63 100755
--- a/opac/opac-changelanguage.pl
+++ b/opac/opac-changelanguage.pl
@@ -22,7 +22,7 @@ use CGI;
 
 my $query    = new CGI;
 my $language = $query->param('language');
-my $url      = $query->referer();
+my $url      = $query->referer() || '/';
 
 # warn "Language : $query // $language // $url";
 C4::Templates::setlanguagecookie( $query, $language, $url );
-- 
1.7.5.4