BugFixing : default language was always en. Not a problem for dev purpose but would be on installation
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
afdf1c6de7
commit
260ec03378
15
C4/Output.pm
15
C4/Output.pm
|
|
@ -132,28 +132,25 @@ sub themelanguage {
|
|||
# But, if there's a cookie set, obey it
|
||||
$lang = $query->cookie('KohaOpacLanguage') if $query->cookie('KohaOpacLanguage');
|
||||
# Fall back to English
|
||||
$lang = 'en' unless $lang;
|
||||
my @languages = split " ", C4::Context->preference("opaclanguages");
|
||||
if ($lang){
|
||||
@languages=($lang,@languages);
|
||||
} else {
|
||||
$lang = $languages[0];
|
||||
}
|
||||
my $theme = 'prog';
|
||||
|
||||
my $dbh = C4::Context->dbh;
|
||||
my @languages;
|
||||
my @themes;
|
||||
if ( $interface eq "intranet" ) {
|
||||
@languages = split " ", C4::Context->preference("opaclanguages");
|
||||
@themes = split " ", C4::Context->preference("template");
|
||||
@languages = ($lang,@languages) if $lang;
|
||||
}
|
||||
else {
|
||||
# we are in the opac here, what im trying to do is let the individual user
|
||||
# set the theme they want to use.
|
||||
# and perhaps the them as well.
|
||||
#my $lang = $query->cookie('KohaOpacLanguage');
|
||||
if ($lang) { # FIXME: if $lang always TRUE!
|
||||
push @languages, $lang;
|
||||
}
|
||||
else {
|
||||
@languages = split " ", C4::Context->preference("opaclanguages");
|
||||
}
|
||||
@themes = split " ", C4::Context->preference("opacthemes");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue