From d20f41b596889aeb28f835afd5f8ae1757498903 Mon Sep 17 00:00:00 2001 From: Charles Farmer Date: Fri, 29 Jun 2018 14:27:00 -0400 Subject: [PATCH] Bug 14272: (follow-up) only display news available for a particular opac lang [alternative patch] --- opac/opac-main.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/opac/opac-main.pl b/opac/opac-main.pl index 9b620cf..e651a55 100755 --- a/opac/opac-main.pl +++ b/opac/opac-main.pl @@ -64,11 +64,13 @@ elsif (C4::Context->userenv and defined $input->param('branch') and length $inpu } my $news_id = $input->param('news_id'); -my (@all_koha_news, $koha_news_count); +my @all_koha_news; if (defined $news_id){ - @all_koha_news = Koha::News->search({ idnew => $news_id }); - $koha_news_count = 1; + @all_koha_news = Koha::News->search({ + idnew => $news_id, + lang => $news_lang, + }); if (scalar @all_koha_news > 0){ $template->param( news_item => @all_koha_news ); } else { -- 2.7.4