From 08a35e1b5989205f5adb79a37dec3403398da939 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 24 Jan 2017 03:31:59 +0000 Subject: [PATCH] Bug 14272: (follow-up) Show single news item MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch applies successfully and behaves as expected. Sponsored-by: Catalyst IT Signed-off-by: Dilan Johnpullé Signed-off-by: Katrin Fischer --- C4/NewsChannels.pm | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm index 5228804..d9463c7 100644 --- a/C4/NewsChannels.pm +++ b/C4/NewsChannels.pm @@ -207,7 +207,7 @@ sub GetNewsToDisplay { FROM opac_news LEFT JOIN borrowers on borrowers.borrowernumber = opac_news.borrowernumber - WHERE (}; + WHERE }; if ( defined $id ) { $query .= q{ opac_news.idnew = ? } if defined $id; @@ -216,7 +216,7 @@ sub GetNewsToDisplay { unless ( defined $time ) { $query .= q{ AND } if defined $id; - $query .= q{ + $query .= q{ ( expirationdate >= CURRENT_DATE() OR expirationdate IS NULL OR expirationdate = '00-00-0000' 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 b31e1c1..5a908c8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -68,7 +68,7 @@ [% FOREACH koha_new IN koha_news %]

[% koha_new.title %]

-
[% koha_new.new %]
+
[% koha_new.content %]
(published on [% koha_new.newdate %][% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %] by [% koha_new.author_title %] [% koha_new.author_firstname %] [% koha_new.author_surname %][% END %])
[% END %] -- 2.1.4