View | Details | Raw Unified | Return to bug 27650
Collapse All | Expand All

(-)a/opac/opac-main.pl (-7 / +6 lines)
Lines 61-77 elsif (C4::Context->userenv and defined $input->param('branch') and length $inpu Link Here
61
}
61
}
62
62
63
my $news_id = $input->param('news_id');
63
my $news_id = $input->param('news_id');
64
my @all_koha_news;
64
my $all_koha_news;
65
65
66
if (defined $news_id){
66
if (defined $news_id){
67
    @all_koha_news = Koha::News->search({ idnew => $news_id, lang => { '!=', 'koha' } }); # get news that is not staff-only news
67
    $all_koha_news = Koha::News->search({ idnew => $news_id, lang => { '!=', 'koha' } }); # get news that is not staff-only news
68
    if( @all_koha_news ) { # we only expect one btw
68
    if( $all_koha_news->count ) { # we only expect one btw
69
        $template->param( news_item => $all_koha_news[0] );
69
        $template->param( news_item => $all_koha_news->next );
70
    } else {
70
    } else {
71
        $template->param( single_news_error => 1 );
71
        $template->param( single_news_error => 1 );
72
    }
72
    }
73
} else {
73
} else {
74
    @all_koha_news   = &GetNewsToDisplay( $template->lang, $homebranch);
74
    $all_koha_news   = &GetNewsToDisplay( $template->lang, $homebranch);
75
}
75
}
76
76
77
# For dashboard
77
# For dashboard
Lines 104-110 if ( $patron ) { Link Here
104
}
104
}
105
105
106
$template->param(
106
$template->param(
107
    koha_news           => @all_koha_news,
107
    koha_news           => $all_koha_news,
108
    branchcode          => $homebranch,
108
    branchcode          => $homebranch,
109
    daily_quote         => Koha::Quotes->get_daily_quote(),
109
    daily_quote         => Koha::Quotes->get_daily_quote(),
110
);
110
);
111
- 

Return to bug 27650