From: Kyle M Hall Date: Thu, 31 Jul 2014 15:28:44 +0000 (-0400) Subject: Bug 12507 - News does not always display in staff or OPAC X-Git-Tag: v3.18.00-beta~633 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=d7c2faa795af0604bf0830534f1a37a2676e1d7b;p=koha-ffzg.git Bug 12507 - News does not always display in staff or OPAC News will not display on the last day of each month due to the way the date is calculated in the SQL code for grabbing news. Test Plan: 1) Create a news item that should display 2) Change your server's date to the last day of the month 3) Note you can no longer see that news item 4) Apply this patch 5) Note you can now see your news item again Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm index 47772efc89..8694c1b964 100644 --- a/C4/NewsChannels.pm +++ b/C4/NewsChannels.pm @@ -197,7 +197,7 @@ sub GetNewsToDisplay { OR expirationdate IS NULL OR expirationdate = '00-00-0000' ) - AND `timestamp` < CURRENT_DATE()+1 + AND DATE(timestamp) < DATE_ADD(CURDATE(), INTERVAL 1 DAY) AND (lang = '' OR lang = ?) AND (branchcode IS NULL OR branchcode = ?) ORDER BY number