[Koha-patches] [PATCH] Bug 3289 - Fixed bad conditional check that made news items not show up until the day after pubdate.

Liz Rea liz at nekls.org
Thu Jun 4 18:22:00 CEST 2009


From: Liz Rea <lrea at nekls.org>

---
 C4/NewsChannels.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm
index 136cc5c..8cf1ff6 100644
--- a/C4/NewsChannels.pm
+++ b/C4/NewsChannels.pm
@@ -328,11 +328,11 @@ sub GetNewsToDisplay {
      SELECT *,timestamp AS newdate
      FROM   opac_news
      WHERE   (
-        expirationdate > CURRENT_DATE()
+        expirationdate >= CURRENT_DATE()
         OR    expirationdate IS NULL
         OR    expirationdate = '00-00-0000'
       )
-      AND   `timestamp` < CURRENT_DATE()
+      AND   `timestamp` <= CURRENT_DATE()
       AND   lang = ?
       ORDER BY number
     ";				# expirationdate field is NOT in ISO format?
-- 
1.5.6.5




More information about the Koha-patches mailing list