# templates.
use strict;
+use warnings;
use C4::Context;
use C4::Languages qw(getTranslatedLanguages get_bidi regex_lang_subtags language_get_description accept_language );
}
my $path = C4::Context->preference('intranet_includes') || 'includes';
my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, $interface, $query );
- my $opacstylesheet = C4::Context->preference('opacstylesheet');
# if the template doesn't exist, load the English one as a last resort
my $filename = "$htdocs/$theme/$lang/modules/$tmplbase";
getTranslatedLanguages($interface,'prog') )
if $http_accept_language;
# But, if there's a cookie set, obey it
- $lang = $query->cookie('KohaOpacLanguage') if $query->cookie('KohaOpacLanguage');
+ $lang = $query->cookie('KohaOpacLanguage') if (defined $query && $query->cookie('KohaOpacLanguage'));
# Fall back to English
my @languages;
if ($interface eq 'intranet') {