Bug 22445: Custom cover images - opac user (checkout list)
[srvgit] / opac / opac-main.pl
index 9b620cf..4af6f1a 100755 (executable)
@@ -64,11 +64,10 @@ 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 => { '!=', 'koha' } }); # get news that is not staff-only news
     if (scalar @all_koha_news > 0){
         $template->param( news_item => @all_koha_news );
     } else {
@@ -105,6 +104,7 @@ if ( $patron ) {
 
 $template->param(
     koha_news           => @all_koha_news,
+    news_lang           => $news_lang,
     branchcode          => $homebranch,
     display_daily_quote => C4::Context->preference('QuoteOfTheDay'),
     daily_quote         => $quote,