From e7a1a3444b2d9a1c616766aeb38f34009f2e9527 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] Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- 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 9b620cfa18..e651a555a3 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.39.5