Index: openacs-4/packages/news/www/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/index.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/news/www/index.xql 24 Feb 2005 18:03:05 -0000 1.3 +++ openacs-4/packages/news/www/index.xql 15 Nov 2017 13:42:33 -0000 1.4 @@ -2,6 +2,47 @@ + + + select 1 where exists ( + select 1 from news_items_approved + where publish_date < current_timestamp + and archive_date < current_timestamp + and package_id = :package_id + ) + + + + + + select 1 where exists ( + select 1 + from news_items_approved + where publish_date < current_timestamp + and (archive_date is null + or archive_date > current_timestamp) + and package_id = :package_id + ) + + + + + + + publish_date < current_timestamp + and (archive_date is null or archive_date > current_timestamp) + + + + + + + + publish_date < current_timestamp + and archive_date < current_timestamp + + + @@ -17,5 +58,4 @@ -