use C4::NewsChannels; # GetNewsToDisplay
use C4::Languages qw(getTranslatedLanguages accept_language);
-use strict;
-use warnings;
-
-
my $input = new CGI;
my $dbh = C4::Context->dbh;
}
);
-my $casAuthentication = C4::Context->preference('casAuthentication');
-$template->param(
- casAuthentication => $casAuthentication,
-);
-
# Get the news to display
# 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;
+my $branchcode = $input->param('branchcode');
-if (C4::Context->userenv) {
- $homebranch = C4::Context->userenv->{'branch'};
-}
-my $all_koha_news = &GetNewsToDisplay($news_lang,$homebranch);
+my $all_koha_news = GetNewsToDisplay( $news_lang, $branchcode );
my $koha_news_count = scalar @$all_koha_news;
$template->param(