@@ -, +, @@ language --- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 2 +- opac/opac-main.pl | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -4,7 +4,7 @@ [% USE Categories %] [% USE KohaNews %] [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] -[% SET OpacHeader = KohaNews.get( location => "opacheader", lang => news_lang, library => branchcode, blocktitle => 0 ) %] +[% SET OpacHeader = KohaNews.get( location => "opacheader", lang => lang, library => branchcode, blocktitle => 0 ) %]
[% END %] - [% SET OpacNavRight = KohaNews.get( location => "OpacNavRight", lang => news_lang, library => branchcode ) %] + [% SET OpacNavRight = KohaNews.get( location => "OpacNavRight", lang => lang, library => branchcode ) %] [% IF ( OpacNav || OpacNavBottom ) && (Koha.Preference( 'opacuserlogin' ) == 1 || OpacNavRight) %]
[% ELSIF (Koha.Preference( 'opacuserlogin' ) == 1 || OpacNavRight) %] --- a/opac/opac-main.pl +++ a/opac/opac-main.pl @@ -48,10 +48,6 @@ $template->param( casAuthentication => $casAuthentication, ); -# display news -# use cookie setting for language, bug default to syspref if it's not set -my ($theme, $news_lang, $availablethemes) = C4::Templates::themelanguage(C4::Context->config('opachtdocs'),'opac-main.tt','opac',$input); - my $homebranch; if (C4::Context->userenv) { $homebranch = C4::Context->userenv->{'branch'}; @@ -74,7 +70,7 @@ if (defined $news_id){ $template->param( single_news_error => 1 ); } } else { - @all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); + @all_koha_news = &GetNewsToDisplay( $template->lang, $homebranch); } my $quote = GetDailyQuote(); # other options are to pass in an exact quote id or select a random quote each pass... see perldoc C4::Koha @@ -104,7 +100,6 @@ if ( $patron ) { $template->param( koha_news => @all_koha_news, - news_lang => $news_lang, branchcode => $homebranch, display_daily_quote => C4::Context->preference('QuoteOfTheDay'), daily_quote => $quote, --