Bug 6874: Attach files to bibliographic records
[koha.git] / opac / opac-news-rss.pl
index 19c6ebf..7b1fe9b 100755 (executable)
@@ -25,10 +25,6 @@ use C4::Output;
 use C4::NewsChannels;    # GetNewsToDisplay
 use C4::Languages qw(getTranslatedLanguages accept_language);
 
-use strict;
-use warnings;
-
-
 my $input = new CGI;
 my $dbh   = C4::Context->dbh;
 
@@ -42,21 +38,13 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
     }
 );
 
-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(