Index: openacs-4/packages/news-portlet/www/news-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/news-portlet.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/news-portlet/www/news-portlet.tcl 29 Mar 2002 19:26:23 -0000 1.9 +++ openacs-4/packages/news-portlet/www/news-portlet.tcl 6 Apr 2002 18:00:06 -0000 1.10 @@ -17,61 +17,17 @@ # # /news-portlet/www/news-portlet.tcl # -# distributed under the terms of the GNU GPL version 2 -# # arjun@openforce.net # # The logic for the news portlet # # $Id$ # - array set config $cf set shaded_p $config(shaded_p) -set data "" - # Should be a list already! XXX rename me! set list_of_instance_ids $config(community_id) -if {[llength $list_of_instance_ids] == 1} { - set one_instance_p 1 -} else { - set one_instance_p 0 -} - -foreach instance_id $list_of_instance_ids { - - if {[db_string news_items_count {} -default 0]} { - set has_items_p 1 - } else { - set has_items_p 0 - } - - if {$has_items_p} { - set parent_name [site_nodes::get_parent_name -instance_id $instance_id] - set parent_url [dotlrn_community::get_url_from_package_id -package_id $instance_id] - - if {!$one_instance_p} { - append data "
  • $parent_name" - } - - append data "" - } - -} - -# portlets shouldn't disappear anymore (ben) -if {[empty_string_p $data]} { - set data "No News" - set no_news_p "t" -} else { - set no_news_p "f" -} +db_multirow news_items select_news_items {}