Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/news/www/index-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/news/www/index-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/news/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/index.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/news/www/index.tcl 7 Aug 2017 23:48:12 -0000 1.21 +++ openacs-4/packages/news/www/index.tcl 15 Nov 2017 13:42:33 -0000 1.22 @@ -38,7 +38,7 @@ set title [apm_instance_name_from_id $package_id] set view_clause [db_map view_clause_live] - if { [db_string archived_p {}]} { + if { [db_0or1row archived_p {}]} { lappend actions_list [_ news.Show_archived_news] \ [export_vars -base [ad_conn url] {{view archive}}] \ [_ news.Show_archived_news] @@ -49,7 +49,7 @@ set title [apm_instance_name_from_id $package_id] set view_clause [db_map view_clause_archived] - if { [db_string live_p {}] } { + if { [db_0or1row live_p {}] } { lappend actions_list [_ news.Show_live_news] \ [export_vars -base [ad_conn url] {{view live}}] \ [_ news.Show_live_news] Index: openacs-4/packages/news/www/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/index.xql,v diff -u -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 @@ -