diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt index 41eac01aab..e977d27592 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -1,4 +1,5 @@ [% USE Koha %] +[% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog [% INCLUDE 'doc-head-close.inc' %] @@ -48,8 +49,9 @@ [% END %]
- - RSS for Library News. + [% SET branchcode = Branches.GetLoggedInBranchcode() %] + + RSS feed for [% IF ( loggedinusername ) %][% Branches.GetName( branchcode ) %] and [% END %] system-wide library news.
[% END %] diff --git a/opac/opac-news-rss.pl b/opac/opac-news-rss.pl index d48fcebc7a..7b1fe9baee 100755 --- a/opac/opac-news-rss.pl +++ b/opac/opac-news-rss.pl @@ -42,12 +42,9 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( # 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(