From e1261ab7df23afd6a78ff3e647fb33bf6fd639b4 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Thu, 5 Jun 2008 17:08:50 +0200 Subject: [PATCH] BUGFIX: the language list was calculated on opaclanguage, whatever the interface Signed-off-by: Joshua Ferraro --- C4/Output.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/C4/Output.pm b/C4/Output.pm index 2209ebb830..6a48b875e8 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -79,7 +79,6 @@ sub gettemplate { $htdocs = C4::Context->config('intrahtdocs'); } my $path = C4::Context->preference('intranet_includes') || 'includes'; - my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, $interface, $query ); my $opacstylesheet = C4::Context->preference('opacstylesheet'); @@ -140,7 +139,12 @@ sub themelanguage { # But, if there's a cookie set, obey it $lang = $query->cookie('KohaOpacLanguage') if $query->cookie('KohaOpacLanguage'); # Fall back to English - my @languages = split " ", C4::Context->preference("opaclanguages"); + my @languages; + if ($interface eq 'intranet') { + @languages = split " ", C4::Context->preference("language"); + } else { + @languages = split " ", C4::Context->preference("opaclanguages"); + } if ($lang){ @languages=($lang,@languages); } else { -- 2.39.5